pete collins wrote:
> we're not going to deprecate the nsIFile::Spawn then spawn in this
> context might be confusing.  How's about execute?  That's what a script
> writer would use in XPInstall.

I've never understood why the break in convention by naming it spawn.
exec() is what i could be called right?

Also, is there any way to get standard output back to the caller?

So if i spawn say a cvs session or what ever, it would be nice if i can
get that standard output back to display in the UI.

PHP has a nifty thing called passthru which will execute a process and
wait for it to finish and then resume w/ script execution. But i can get
the stdout from the forked process which is real useful.

--------------------------------------------------------------
passthru --  Execute an external program and display raw output
void passthru (string command [, int return_var])

--pete

I have some working XPCOM code that implements exactly this feature (among other things). I hope to post the code in some public place within a week or two.  Basically the code implements an nsIPipeTransport interface, similar to the nsISocketTransport interface in Necko. It allows you to open a pipe (or TCP socketpair) to any execute any command, send input data and receive the output back. If there is interest, and approval, the code could be incorporated into the Mozilla source tree at some point.

Saravanan

--
http://xmlterm.org            [EMAIL PROTECTED]
 


Reply via email to