Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created October 2, 2009 06:25
Show Gist options
  • Save petyosi/199507 to your computer and use it in GitHub Desktop.
Save petyosi/199507 to your computer and use it in GitHub Desktop.
#!/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