in reply to Daemon possessed perl
Here's a short example:
Proc::Daemon pretty much does the same as this, but re-opens STDIN,STDOUT,STDERR and a few other things. You might want to check the source for that module, if you're interested. Also it's probably best to use that module if this is going to be production code. I just thought I'd show the non-module way (for learning purposes).# do startup/initialization code ... if (my $pid = fork()) { print "Sending to background...\n"; exit(0); } ... # main application code here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Daemon possessed perl
by mr_mischief (Monsignor) on May 23, 2003 at 01:48 UTC | |
|
Re: Re: Daemon possessed perl
by Anonymous Monk on May 22, 2003 at 15:58 UTC |