Skip to content

Instantly share code, notes, and snippets.

@halcyonCorsair
Forked from roidrage/wrap.rb
Created May 28, 2013 06:38
Show Gist options
  • Save halcyonCorsair/5660866 to your computer and use it in GitHub Desktop.
Save halcyonCorsair/5660866 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
pid = Kernel.fork do
`#{ARGV.join(" ")}`
exit
end
trap(:CHLD) do
print "\n"
exit
end
loop do
sleep 10
begin
Process.kill(0, pid)
print '.'
rescue Errno::ESRCH
print "\n"
exit 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment