On Sun, Apr 27, 2008 at 4:53 PM, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Sun, Apr 27, 2008 at 2:49 AM, Michael Barnes <[EMAIL PROTECTED]> wrote:
> #make sure the last thing done is the removal of the pidfile > #note: this happens even if we die >END { > our $program; > unlink("/var/run/$program") > or die "could not delete /var/run/$program"; >} As I have said (in fact it's said by Lincoln Stein), you should add a "if" statement here to avoid the childs delete the pid file when they're exiting. if ( $$ == $pid ) { # $pid is parent's pid unlink $pidfile or die $!; } -- J. Peng - QQMail Operation Team eMail: [EMAIL PROTECTED] AIM: JeffHua -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/