Skip to content

Instantly share code, notes, and snippets.

@zlx
Created June 15, 2014 06:17
Show Gist options
  • Save zlx/10eab72f9722257abcfa to your computer and use it in GitHub Desktop.
Save zlx/10eab72f9722257abcfa to your computer and use it in GitHub Desktop.
An fork example
puts "parent process pid is #{Process.pid}"
if fork
puts "entered the if block from #{Process.pid}"
else
puts "entered the else block from #{Process.pid}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment