From d505128fbcd85d7a5a2e3438d47509d391ce5a11 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 13 Jan 2019 08:32:24 +0000 Subject: [PATCH] Do not exit on SIGCHLD: With bash 5.0, a SIGCHLD signal is sent whenever a subshell exits. The signal numbers passed to the trap instruction in jhalfs contain SIGCHLD, and this new behavior causes jhalfs to exit. Fix this by using names instead of numbers for the trap, and (of course) not trapping SIGCHLD. --- jhalfs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jhalfs b/jhalfs index ebe1ad6..80588ad 100755 --- a/jhalfs +++ b/jhalfs @@ -66,7 +66,9 @@ see_ya() { set -e trap see_ya 0 trap 'simple_error "${LINENO}" "$?" "${FUNCNAME}" "${BASH_SOURCE}"' ERR -trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18 23 +trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' \ + HUP INT QUIT TERM # STOP stops tterminal output and does not seem to + # execute the handler #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> version="