For future reference, here is a way to use execvp() from node:
const ffi = require('ffi');
const ref = require('ref');
const ArrayType = require('ref-array');
const stringAry = ArrayType('string');
var current = ffi.Library(null,
{ execvp: ['int', ['string',
On Wed, 1/18/17, selenagracia795 via nodejs wrote:
Subject: Re: [nodejs] execve in node
To: nodejs@googlegroups.com
Date: Wednesday, January 18, 2017, 4:52 PM
On Tue, 1/17/17, Daniel Risacher
On Tue, 1/17/17, Daniel Risacher wrote:
Subject: Re: [nodejs] execve in node
To: nodejs@googlegroups.com
Date: Tuesday, January 17, 2017, 4:04 PM
Well, clearly it is
possible to achieve the broad objective of
starting a new program with
cp.spawn/spawnSync have very different semantics to execve though. They
maintain a parent process, which I imagine is what Daniel is trying to
avoid.
On Mon, Jan 16, 2017 at 2:26 PM, Fedor Indutny wrote:
> I'm not sure if it helps, but have you already tried
> child_process.spawnSync?
>
> On Mon
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() wi
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 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
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 Wi
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 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,
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 do