aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Weiser <michael.weiser@gmx.de>2019-02-28 13:37:39 +0000
committerMichael Weiser <michael.weiser@gmx.de>2019-02-28 15:10:58 +0000
commit4c38a4a985833aa50afb7f63746dab6d1f28d666 (patch)
treef209ae2a911df0d9988880efd02eac7fce19b19b /src
parentFix password change dash compatibility (diff)
downloadlaps-4c38a4a985833aa50afb7f63746dab6d1f28d666.tar.gz
laps-4c38a4a985833aa50afb7f63746dab6d1f28d666.tar.bz2
laps-4c38a4a985833aa50afb7f63746dab6d1f28d666.zip
Do not trap SIGCHLD for dash compatibility
dash honors our trapping of SIGCHLD and will cause the script to exit after the first external command finishes executing. Strangely enough, bash seems to ignore the same attempt to catch SIGCHLD.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/share/laps/laps.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr/share/laps/laps.sh b/src/usr/share/laps/laps.sh
index 1209f65..9780b9e 100755
--- a/src/usr/share/laps/laps.sh
+++ b/src/usr/share/laps/laps.sh
@@ -679,7 +679,9 @@ define_if_new LAPS_INTERACTIVE 0
# SET TRAPS
#trap "CTRLC" 2
#trap "CTRLZ" 18
-trap '__ec=$? ; clean_laps ; trap "" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; exit ${__ec} ;' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+# do NOT catch SIGCHLD (17) because dash will actually exit then (bash seems to
+# ignore our attempt to catch it)
+trap '__ec=$? ; clean_laps ; trap "" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 ; exit ${__ec} ;' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20
# DEBUG SIMPLECONF
debuglev 5 && {
bgstack15