Skip to content

Instantly share code, notes, and snippets.

@chenyong
Created January 31, 2018 02:27
Show Gist options
  • Save chenyong/c91304129b04901200f424e2d1c6ce37 to your computer and use it in GitHub Desktop.
Save chenyong/c91304129b04901200f424e2d1c6ce37 to your computer and use it in GitHub Desktop.
Process started with child_process.spawnSync does not die with its parent
coffee p.coffee
# then kill process with `kill`
ps-tree
# the process `sleep` remains, but under root process
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