summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-19 13:00:33 +0200
committerJulian Andres Klode <jak@debian.org>2016-10-05 21:53:38 +0200
commitf5aa6a782f1a8bcf08b572415ec6b521e11a8d82 (patch)
tree67fde30fa2d3560d68129e5e558acdd5cfddeb42 /methods
parent65979c215df7a4fe1585fd988e4e5a06bc5d306b (diff)
Ignore SIGINT and SIGQUIT for Pre-Install hooks
Instead of erroring out when receiving a SIGINT, let the child deal with it - we'll error out anyway if the child exits with an error or due to the signal. Also ignore SIGQUIT, as system() ignores it. This basically fixes Bug #832593, but: we are running the hooks via sh -c. Some shells exit with a signal error even if the command they are executing catches the signal and exits successfully. So far, this has been noticed on dash, which unfortunately, is our default shell. Example: $ cat trap.sh trap 'echo int' INT; sleep 10; exit 0 $ if dash -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint FAIL: 130 $ if mksh -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint OK: 0 $ if bash -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint OK: 0 (cherry picked from commit a6ae3d3df490e7a5a1c8324ba9dc2e63972b1529)
Diffstat (limited to 'methods')
0 files changed, 0 insertions, 0 deletions