Well, clearly it is possible to achieve the broad objective of
starting a new program with child_process.spawnSync(). In my case, I
do not need the nodejs process afterwards, I do not need to capture
the output of the program, and the only thing that node would be doing
is waiting to call exit() with the right value.

"Just use perl" is simpler, although I think I may try
require('ffi').Library(null, { 'execve': .... })

On Mon, Jan 16, 2017 at 2:26 PM, Fedor Indutny <[email protected]> wrote:
> I'm not sure if it helps, but have you already tried
> child_process.spawnSync?
>
> On Mon, Jan 16, 2017 at 09:11 Daniel Risacher <[email protected]> wrote:
>>
>> I find deep irony in your answer, in that I was trying to rewrite a simple
>> script that I'd already written in perl with a nodejs version to eliminate
>> the perl dependency.
>>
>>
>> On Thursday, January 12, 2017 at 9:53:38 AM UTC-5, Matt Sergeant wrote:
>>>
>>> No there's no equivalent to it, mostly because Windows has no way to do
>>> it. Maybe try perl instead.
>>>
>>> On Fri, Jan 6, 2017 at 5:08 PM, Daniel Risacher <[email protected]>
>>> wrote:
>>>>
>>>> Is it possible to execute another program in the manner of execve(2)?
>>>>
>>>> I.e. as the man page says, "execve() does not return on success, and the
>>>> text, data, bss, and stack of the calling process are overwritten by that 
>>>> of
>>>> the program loaded."
>>>>
>>>> I don't see any function in the core modules that does this.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> Job board: http://jobs.nodejs.org/
>>>>
>>>>
>>>> New group rules:
>>>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>>>>
>>>>
>>>> Old group rules:
>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>>
>>>>
>>>> ---
>>>>
>>>>
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>>
>>>>
>>>>
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>>>
>>>> To post to this group, send email to [email protected].
>>>>
>>>>
>>>>
>>>>
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/nodejs/026d265f-93a4-4369-ae5e-7ef6433e0d3e%40googlegroups.com.
>>>>
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> Job board: http://jobs.nodejs.org/
>>
>>
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>>
>>
>> Old group rules:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>
>>
>> ---
>>
>>
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>>
>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>>
>>
>> To post to this group, send email to [email protected].
>>
>>
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/0e858cf2-d3de-44d9-aa2e-18805cd764d4%40googlegroups.com.
>>
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/4vtWG1KCQC4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CAEv2VfKFHS803Lh9srVB%3DqSy-wFi20j6%2B%2BDEfo%2BQcg74aStb3A%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAAD1OeKFTtYqebXDy6jbUbVmsoZr_a3KJo6CVvzyMYWZ8TLQ1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to