diff options
author | Eric Wong <e@yhbt.net> | 2020-03-22 08:58:49 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-24 22:00:45 +0000 |
commit | decbb9936a25dfedf6ecd916d8e0403f06217ec9 (patch) | |
tree | c6811d629f13e9688cb9f9e4667aa5abe920b9bb /lib | |
parent | d7fda3f4b9d4c9e6d01c818f09905d6827fa693f (diff) | |
download | public-inbox-decbb9936a25dfedf6ecd916d8e0403f06217ec9.tar.gz |
We need to track the PID file having ".oldbin" appended to it while a SIGUSR2 upgrade is in progress and ensure it is unlinked on SIGQUIT.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Daemon.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index 3d582e35..4ff7cad4 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -247,7 +247,7 @@ sub daemonize () { write_pid($pid_file); # for ->DESTROY: - bless { pid => $$, pid_file => $pid_file }, __PACKAGE__; + bless { pid => $$, pid_file => \$pid_file }, __PACKAGE__; } sub worker_quit { # $_[0] = signal name or number (unused) @@ -663,7 +663,7 @@ sub write_pid ($) { } sub DESTROY { - unlink_pid_file_safe_ish($_[0]->{pid}, $_[0]->{pid_file}); + unlink_pid_file_safe_ish($_[0]->{pid}, ${$_[0]->{pid_file}}); } 1; |