Skip to content

Instantly share code, notes, and snippets.

@rdp
Created September 28, 2012 09:11
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 rdp/3798801 to your computer and use it in GitHub Desktop.
Save rdp/3798801 to your computer and use it in GitHub Desktop.
process.kill with IO.popen
a = IO.popen('ls', 'w')
pid = a.pid
Process.kill 0, pid # should return 1, jruby on linux doesn't do this, MRI does
a.close
Process.kill 0, pid # should raise EPERM. Unfortunately with jruby for windows matching parity with MRI, this doesn't raise EPERM, meaning that somehow the process mustt have been left in a zombie state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment