Remove PID file on exit, if we were told to create one with --pid-file

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@525 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Devin Carraway 2005-07-29 07:22:36 +00:00
parent a2064bc22e
commit 00e06cc612
1 changed files with 3 additions and 0 deletions

View File

@ -81,6 +81,9 @@ sub REAPER {
sub HUNTSMAN {
$SIG{CHLD} = 'DEFAULT';
kill 'INT' => keys %childstatus;
if ($PID_FILE && -e $PID_FILE) {
unlink $PID_FILE or ::log(LOGERROR, "unlink: $PID_FILE: $!");
}
exit(0);
}