Fix unitialized-value warning if the PID file existed but was zero-length

at startup time.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@536 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Devin Carraway 2005-07-30 09:32:36 +00:00
parent bde5a3fef9
commit da5c0a74fe

View File

@ -110,7 +110,7 @@ if ($PID_FILE) {
if (-e $PID_FILE) { if (-e $PID_FILE) {
open PID, "+<$PID_FILE" open PID, "+<$PID_FILE"
or die "open pid_file: $!\n"; or die "open pid_file: $!\n";
my $running_pid = <PID>; chomp $running_pid; my $running_pid = <PID> || ''; chomp $running_pid;
if ($running_pid =~ /(\d+)/) { if ($running_pid =~ /(\d+)/) {
$running_pid = $1; $running_pid = $1;
if (kill 0, $running_pid) { if (kill 0, $running_pid) {