Re: Creating PID file



On Sun, Apr 27, 2008 at 9:50 AM, J. Peng <peng.kyo@xxxxxxxxx> wrote:


END {
unlink "/path/program.pid" if $$ = $pid;

sorry, it's "==" not "=".

unlink "/path/program.pid" if $$ == $pid;

This avoid the child (if have) try to delete the pid file when it exits.

}




--
J. Peng - QQMail Operation Team
eMail: peng.kyo@xxxxxxxxx AIM: JeffHua
.



Relevant Pages