0.2.0 • Published 3 years ago

pseudoexec v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Ersatz exec(3) for Node JS

Node JS doesn't provide any means for processes to replace themselves through functions from the exec(3) family. Thus, pseudoexec provides a convenience wrapper over child_process.spawn() that causes the child process to inherit the parent process' stdio(3) standard input/output/error streams and handle all the syscalls(2) sent to the parent.

⚠️ Warning: Windows is not fully supported, because it doesn't support signals.

Example

const { pseudoexec } = require("pseudoexec");

pseudoexec("sl", ["-f", "-a"]).then(process.exit);

Maintenance

This package uses process.binding() (DEP0111) to retrieve a list of signals specific to the current operating system, exactly in the same way as Node JS does internally. This function is pending deprecation and might not be available in future versions of Node JS.

Alternatives

0.2.0

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago