~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
a517e7b
..
98e39c2
100755
(executable)
--- a/
disorder-ondemand.in
+++ b/
disorder-ondemand.in
@@
-49,7
+49,7
@@
$SIG{CHLD} = sub {
};
$SIG{TERM} = $SIG{INT} = sub {
-
kill "TERM", $PID if defined $PID
;
+
eval { my $pid = $PID; kill "TERM", $pid if defined $pid; }
;
exit 0;
};