Skip to content
Create a gist now

Instantly share code, notes, and snippets.

zombie process created by ruby
$ (ruby zombie.rb & ) ; sleep 2 ; ps
PID TTY TIME CMD
8609 pts/2 00:00:00 zsh
8651 pts/2 00:00:00 sh
8653 pts/2 00:00:00 ruby
8655 pts/2 00:00:00 sleep <defunct>
8656 pts/2 00:00:00 ps
require 'timeout'
begin
Timeout.timeout(1) do
system('sleep 2')
end
rescue Timeout::Error
end
sleep 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.