about summary refs log tree commit homepage
path: root/script/public-inbox-init
diff options
authorEric Wong <e@80x24.org>2020-12-31 13:51:54 +0000
committerEric Wong <e@80x24.org>2021-01-01 05:00:40 +0000
commit0d6777e0389fe2db3edce41d675320746433f5b7 (patch)
treebd74fac722a93a2432e472e9b5c9797a41737f5f /script/public-inbox-init
parent3823705b72199c61e8ed96aabd34d21a63fe153c (diff)
Since we'll be forking for Xapian indexing and maybe
other places, having a simple guard in place to ensure
OnDestroy doesn't unexpectedly unlink files or similar
is a safer option.
Diffstat (limited to 'script/public-inbox-init')
1 files changed, 1 insertions, 1 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init
index 693f5ca1..222d0c60 100755
--- a/script/public-inbox-init
+++ b/script/public-inbox-init
@@ -92,7 +92,7 @@ sysopen($lockfh, $lockfile, O_RDWR|O_CREAT|O_EXCL) or do {
 require PublicInbox::OnDestroy;
-my $auto_unlink = PublicInbox::OnDestroy->new(sub { unlink $lockfile });
+my $auto_unlink = PublicInbox::OnDestroy->new($$, sub { unlink $lockfile });
 my ($perm, %seen);
 if (-e $pi_config) {
         open(my $oh, '<', $pi_config) or die "unable to read $pi_config: $!\n";