chiark
/
gitweb
/
~mdw
/
disorder-toys
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c637731
)
disorder-ondemand.in: Guard against `$PID' getting lost halfway through.
master
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 2 Jul 2021 17:00:53 +0000
(18:00 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 2 Jul 2021 17:02:24 +0000
(18:02 +0100)
disorder-ondemand.in
patch
|
blob
|
blame
|
history
diff --git
a/disorder-ondemand.in
b/disorder-ondemand.in
index a517e7b9d08fb5dcf20f9b0a4d35aaaf263f9344..98e39c22818d14d1d84fd0e697a095922f1c2216 100755
(executable)
--- a/
disorder-ondemand.in
+++ b/
disorder-ondemand.in
@@
-49,7
+49,7
@@
$SIG{CHLD} = sub {
};
$SIG{TERM} = $SIG{INT} = sub {
};
$SIG{TERM} = $SIG{INT} = sub {
-
kill "TERM", $PID if defined $PID
;
+
eval { my $pid = $PID; kill "TERM", $pid if defined $pid; }
;
exit 0;
};
exit 0;
};