in reply to detacher.pl
Slightly simpler is to use Proc::Daemon.
Or ...use Proc::Daemon; Proc::Daemon::Init; exec @ARGV;
The difference is that this will start a new session, making it pretty much impossible that the background process will gain access to any terminal.perl -MProc::Daemon -e 'Proc::Daemon::Init; exec @ARGV' some command h +ere
I'm sure someone could golf this down further, but I'm just trying to get simpler, not smaller. :-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: detacher.pl
by enemyofthestate (Monk) on Apr 29, 2005 at 14:01 UTC |