Skip to content

Instantly share code, notes, and snippets.

@mrnugget
Created October 8, 2015 10:59
Show Gist options
  • Select an option

  • Save mrnugget/cdbb2af2bf682645ab63 to your computer and use it in GitHub Desktop.

Select an option

Save mrnugget/cdbb2af2bf682645ab63 to your computer and use it in GitHub Desktop.
pid = fork { sleep 1 }
puts "pid=#{pid}"
sleep 3
puts "Process.waitall=#{Process.waitall}"
# Output:
# pid=52057
# Process.waitall=[[52057, #<Process::Status: pid 52057 exit 0>]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment