+ * Notice errors writing out the PID file and abort.
+
0.24 2011-10-04 Tomas Doran <bobtfish@bobtfish.net>
* Further fix to pm_wait routine to find the correct PID and remove it
(fixing logical error introduced in the last release), noted by Vadim
sub pm_write_pid_file {
my ($this,$fname) = self_or_default(@_);
$fname ||= $this->pid_fname() or return;
- if (!open PIDFILE, ">$fname") {
+ my $PIDFILE
+ if (!open $PIDFILE, ">$fname") {
$this->pm_warn("open: $fname: $!");
return;
}
- print PIDFILE "$$\n";
- close PIDFILE;
+ print $PIDFILE "$$\n" or die "Could not print PID: $!";
+ close $PIDFILE or die "Could not close PID file";
}
=head2 pm_remove_pid_file