Created
September 28, 2012 09:11
-
-
Save rdp/3798801 to your computer and use it in GitHub Desktop.
process.kill with IO.popen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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