mafintosh / respawn

Spawn a process and restart it if it crashes
MIT License
255 stars 37 forks source link

can't pass execPath or execArgs when forking #22

Open ctrombley opened 6 years ago

ctrombley commented 6 years ago

This would be useful for scenarios where the child process needs to use a different runtime than the parent.

From the docs for child_process.fork:

By default, child_process.fork() will spawn new Node.js instances using the process.execPath of the parent process. The execPath property in the options object allows for an alternative execution path to be used.

This can be accomplished easily by plumbing these two params through the passed opts. I'd like to submit a PR but first I'd like some input from the maintainers on the testing approach:

MrCheater commented 6 years ago

+1