Created
October 2, 2009 06:25
-
-
Save petyosi/199507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'ruby-debug' | |
pid = fork do | |
exec("lftp -c 'sleep 100000' &> /dev/null") | |
end | |
puts "forked with #{pid}\n" | |
Process.detach(pid) | |
Process.kill("TERM", pid) | |
puts `ps aux | grep lftp` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment