use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS $Q $SIG_CODEREF);
BEGIN {
- $VERSION = '0.23';
+ $VERSION = '0.24';
@ISA = qw(Exporter);
@EXPORT_OK = qw(pm_manage pm_die pm_wait
pm_write_pid_file pm_remove_pid_file
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