summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2015-11-26 14:56:39 +0100
committerBjørn Mork <bjorn@mork.no>2015-11-26 14:56:39 +0100
commitad4a41062c6a2b39ca8718f23f1d5569ece69619 (patch)
tree54975543fb8d9ab02588ae21a7bc87212bb39d65
parent3dcdb0da61119bbd9c383a7aca0b9d557878a10b (diff)
swi_setusbcomp: do a silent normal exit in QMI mode too
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rwxr-xr-xscripts/swi_setusbcomp.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/swi_setusbcomp.pl b/scripts/swi_setusbcomp.pl
index 65c8725..7210779 100755
--- a/scripts/swi_setusbcomp.pl
+++ b/scripts/swi_setusbcomp.pl
@@ -197,7 +197,8 @@ sub reader {
my $timeout = shift || 0;
eval {
- local $SIG{ALRM} = sub { die "timeout\n" }; # NB: \n required
+ local $SIG{ALRM} = sub { die "timeout\n" };
+ local $SIG{TERM} = sub { die "close\n" };
my $raw = '';
my $msglen = 0;
alarm $timeout;
@@ -542,7 +543,7 @@ sub quit {
print F &mk_close_msg;
} else {
# simply signal reader to quit
- kill 'ALRM', $pid;
+ kill 'TERM', $pid;
}
# wait for the reader to exit (on CLOSE_DONE)