Merge r536 from 0.31 branch (silence uninitialized-value warning on zero-length PID file)

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@540 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Devin Carraway 2005-07-31 09:02:42 +00:00
parent 4a6f5dd2f0
commit ff4c5d1ff2

View File

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