> Hi,
>
> playing around with child process in Chromeless, this is now easier
> thanks to Lloyed's example as you can see in [1].
>
> In my usecase, I need to read the output of the child process. Reading
> the output once the child process is terminated is enough here, so no
> piping/streams required. The child_process.js file has stdin, stdout,
> stderr, but these are not bound to the process at all.
>
> Reading the MDC pages about the nsIProcess object [2], I can't see how
> to get the output from the process :/ Is there a way to do this?
No, I don't think it is possible with that API. And as you've discovered, child_process.js has non-implemented stub code which suggests it has features that it does not.
In order for child_process to be more interesting we either need to wait for improvements to land in gecko (there are some open bugs around this that are about four years old), or use jsctypes and include a little bit of native code.
Anything you discover in this area is interesting to me, there's several chromeless issues already open about child processes.
lloyd
> [1]: https://github.com/mozilla/chromeless/blob/0a7afc64c22333b18d1a33b5650745ed24a6da4e/modules/lib/child_process.js
> [2]: https://developer.mozilla.org/en/nsIProcess
>
> --
> You received this message because you are subscribed to the Google Groups "mozilla-labs" group.
> To post to this group, send email to mozill...@googlegroups.com.
> To unsubscribe from this group, send email to mozilla-labs...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mozilla-labs?hl=en.
>
> Another option is to bundle the IPC libs with Chromeless:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=68702#c242
That looks like the best option yet, thanks Dietrich!
lloyd