Created
May 19, 2013 01:38
-
-
Save morhekil/5606324 to your computer and use it in GitHub Desktop.
Ruby - exception in the forked process
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
child = fork do | |
raise RuntimeError, "testing child exception" | |
end | |
pid, status = Process.wait2 child | |
puts status.inspect |
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
% ruby exception.rb | |
exception.rb:2:in `block in <main>': testing child exception (RuntimeError) | |
from rubytest.rb:1:in `fork' | |
from rubytest.rb:1:in `<main>' | |
#<Process::Status: pid 57654 exit 1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment