posix_spawn
v0.0.1
Published
Binding to posix_spawn
Downloads
2
Readme
posix_spawn
This module binds posix_spawn() to nodejs. This module aims to become a drop-in replacement for child_process
, as child_process
relies on fork() and, thus, requires enough free memory to spawn child processes. (cf. Node Issue #25382)
API
const childProcess = require('posix_spawn');
Method: exec()
childProcess.exec(cmd[, options], [(err, rc, stdout, stderr) => {}])
Executes cmd
with /bin/sh
. When the child process exits, the callback function will be called: rc
is a number hand holds the return code. stdout
and stderr
are Buffer
and hold the data the child wrote into the respective pipe.