Skip to content

Instantly share code, notes, and snippets.

@asantos00
Created August 17, 2020 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asantos00/bdd4357cb91f18b368085eb44105ea97 to your computer and use it in GitHub Desktop.
Save asantos00/bdd4357cb91f18b368085eb44105ea97 to your computer and use it in GitHub Desktop.
Reproduction of a deno bug with subprocesses
const command = ['deno', 'run', './script.ts'];
const p1 = Deno.run({ cmd: command })
const p2 = Deno.run({ cmd: command })
const p3 = Deno.run({ cmd: command })
const p4 = Deno.run({ cmd: command })
p1.kill(Deno.Signal.SIGKILL)
p2.kill(Deno.Signal.SIGKILL)
p3.kill(Deno.Signal.SIGKILL)
p4.kill(Deno.Signal.SIGKILL)
setInterval(() => {
// just to keep it running so you can `ps aux | grep deno` to check the zombie processes
}, 1000);
console.log('Will run server at port 8080');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment