Skip to content

Instantly share code, notes, and snippets.

@chenyong
Created January 31, 2018 02:27
Show Gist options
  • Save chenyong/d084e957db501b38046110122bc17aaf to your computer and use it in GitHub Desktop.
Save chenyong/d084e957db501b38046110122bc17aaf 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