This is the same problem as seen in https://github.com/chjj/pty.js/issues/8 (which is closed). The following spawns a bash shell every 3 seconds, and destroys each one after 500ms. It leaves behind a bunch of zombie processes. ``` PTY = require("pty.js") console.log "Process: #{process.pid}" bash = -> pty = PTY.spawn("bash",[],{ name: 'xterm-color' cwd: process.cwd() env: process.env }) setTimeout (-> console.log "kill", pty.pid # Both of the following leave zombie processes # process.kill(pty.pid,"SIGTERM") # process.kill(pty.pid,"SIGHUP") pty.destroy() ), 500 setInterval (-> bash()), 3000 ```