# Abstract class to implement Daemons
#
# Features:
-# * lock and write PID file /var/run/$name.pid to make sure onyl
+# * lock and write PID file /var/run/$name.pid to make sure only
# one instance is running.
# * keep lock open during restart
# * correctly daemonize (redirect STDIN/STDOUT)
my ($running, $pid) = $self->running();
if ($running) {
- die "can't aquire lock '$lkfn' - daemon already started (pid = $pid)\n";
+ die "can't acquire lock '$lkfn' - daemon already started (pid = $pid)\n";
} else {
- die "can't aquire lock '$lkfn' - $err\n";
+ die "can't acquire lock '$lkfn' - $err\n";
}
}
};
return if $allow_open_children && $self->{leave_children_open_on_reload};
# else send TERM to all (old and current) child workers
- kill 15, keys %{$self->@{'workers','old_workers'}};
+ kill 15, (keys %{$self->{workers}}, keys %{$self->{old_workers}});
# nicely shutdown childs (give them max 10 seconds to shut down)
my $previous_alarm = alarm(10);