[Jslib] IPC

Pete Collins pete at mozdevgroup.com
Tue Mar 2 11:01:22 EST 2004


Brian Thomason wrote:

> Hello all,
>
> I am looking to write a frontend to Bittorent in XUL and thus need to 
> be able to read the stdout of the bittorrent client, continuously, 
> buffered 6 libes at a time.
>
> I am aware that you can execute a process like this:
>
> __IMPORT__("chrome://mozlib/content/lib/js/io/file/", 
> "process_instantiator.js");
> const PROGRAM = '/path/to/your/process';  //put the real path to your 
> process
> const PROGRAM_ARGS = ['-chrome']; //put any arguments for your process
> const RUNNING = false;
> var processor = new IO_file_processInstantiator();
> processor.set_handle(PROGRAM);
> processor.setProcess(RUNNING, PROGRAM_ARGS);
>
> But is there any way to read and buffer the stdout of the process as 
> well?

I'm really not sure if you can. I do know that protozilla provides a way 
to read stdout similar to php pasthru() method. I don't think it is 
implemented on all platforms though.

--pete

>
> I have also looked into the IPC extension from Doug Turner, but find 
> little in the way of documentation concerning it.
>
> Thanks in advance for your time, and any help would be greatly 
> appreciated.
>
> -Brian
>
> _______________________________________________
> Jslib mailing list
> Jslib at mozdev.org
> http://mozdev.org/mailman/listinfo/jslib
>
>


-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Jslib mailing list