Created
January 31, 2018 02:27
-
-
Save chenyong/d084e957db501b38046110122bc17aaf to your computer and use it in GitHub Desktop.
Process started with child_process.spawnSync does not die with its parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coffee p.coffee | |
# then kill process with `kill` | |
ps-tree | |
# the process `sleep` remains, but under root process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp = require 'child_process' | |
ret = cp.spawnSync 'sleep', ['100'] | |
console.log ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment