Skip to content

Instantly share code, notes, and snippets.

@satoryu
Last active June 21, 2019 02:26
Show Gist options
  • Save satoryu/5efb4c3ff41ab71d3869504a86b173ba to your computer and use it in GitHub Desktop.
Save satoryu/5efb4c3ff41ab71d3869504a86b173ba to your computer and use it in GitHub Desktop.
Spike code to confirm how Process and its fork work
chpid = Process.fork do
10.times do
STDOUT.puts "Foo"
sleep 1
end
end
puts "Child process started"
Process.waitpid(chpid)
puts "End"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment