Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created April 15, 2009 14:49
Show Gist options
  • Save petyosi/95809 to your computer and use it in GitHub Desktop.
Save petyosi/95809 to your computer and use it in GitHub Desktop.
petyo@t400:~/Test$ cat test.rb fail.rb
#!/usr/bin/env ruby
require 'English'
require 'rubygems'
require 'ruby-debug'
pid = fork { exec("./fail.rb &> /dev/null") }
Process.wait(pid)
p $CHILD_STATUS.to_int
#!/usr/bin/env ruby
#
exit 1
petyo@t400:~/Test$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment