Pop-up equivalent in XPCOM?

I am trying to use XULRunner to add a GUI to a command line based program.

One solution would be to use something like popen from the XUL application to interact with the command line program.

My questions:

  • Does XPCOM have popen?
  • Does XPCOM have enough primitives to create popen?
  • Is there any other approach that gives access to the standard in / out of the process?

PyXPCOM seems to have this capability, but I would not add a dependency if possible.

+4
source share
1 answer

[edit] It is possible to implement using js-ctypes , and in fact, someone has already done this.

The module is called subprocess.jsm , here is the documentation: http://hg.mozilla.org/ipccode/file/tip/readme.txt

(version of the 2009 answer: not in pure JS, no. It is possible to create a binary component of XPCOM, and actually someone did it - see <a2> .)

0
source

All Articles