Created
January 31, 2018 02:27
-
-
Save chenyong/c91304129b04901200f424e2d1c6ce37 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