Any chance you backport these changes onto the hg repo at mozilla.org?

Cheers,

jonathan

On Tue 25 Dec 2012 12:21:15 PM CET, Patrick Brunschwig wrote:
> The ipccode works fine. I'm using it in Enigmail for piping to/from
> GnuPG. I have newer (development) version with a few enhancements at
> <https://sourceforge.net/p/enigmail/source/ci/master/tree/ipc/>
>
> -Patrick
>
> On 23.12.12 10:24, Jonathan Protzenko wrote:
>> Patrick Brunschwig used to work on ipccode, the XPCOM library that is
>> able to read/write from a process's stdin/stdout. He uses it to
>> communicate with gpg for Enigmail (Thunderbird addon).
>>
>> http://hg.mozilla.org/ipccode/
>>
>> I don't know what the status of this code is, but from reading
>> https://bugzilla.mozilla.org/show_bug.cgi?id=68702 it looks like it
>> works, it does precisely what you want, and it no longer requires C++
>> parts since it's been rewritten using js-ctypes.
>>
>> Cheers,
>>
>> jonathan
>>
>> On Sun 23 Dec 2012 06:33:08 AM CET, Philip Chee wrote:
>>> On 23/12/2012 02:58, Ted Mielczarek wrote:
>>>> On 12/22/2012 1:02 PM, rvj wrote:
>>>>> its a while since I used the ns interfaces. I want to run
>>>>>
>>>>>     gambit-enumpure < e02.nfg > numerate.txt
>>>>>
>>>>> how do I pass as arguments in nsiProcess?
>>>>>
>>>>> I asssume the file names must be prefixed with c:\\
>>>>>
>>>>> is this correct?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ***************************************************************************************
>>>>>
>>>>>
>>>>>
>>>>> var file = Components.classes["@mozilla.org/file/local;1"]
>>>>>   .createInstance(Components.interfaces.nsILocalFile);
>>>>>
>>>>> file.initWithPath("c:\\gambit-enumpure.exe ")
>>>>>
>>>>> var process=Components.classes["@mozilla.org/process/util;1"]
>>>>> .createInstance(Components.interfaces.nsIProcess);
>>>>>
>>>>> process.init(file)
>>>>>
>>>>> var args = ["<","c:\\e02.nfg",">","c:\\numerate.txt"]
>>>>>
>>>>> process.run(true,args,args.length)
>>>>>
>>>>>
>>>> This will not work. the < and > are only parsed by a shell, they are not
>>>> true commandline arguments. nsIProcess does not run its arguments
>>>> through a shell, so you can't redirect things that way. I don't think we
>>>> have any platform support for running processes and redirecting their
>>>> I/O.
>>>>
>>>> -Ted
>>>
>>> Can you run a shell script using nsiProcess? Or even the shell (cmd,
>>> bash, etc) itself?
>>>
>>> Phil
>>>
>
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to