From 3a94bf6de8f96d5a42ba3a3334d34bf62a54baa9 Mon Sep 17 00:00:00 2001 From: Bolun Thompson Date: Sun, 29 Dec 2024 23:18:20 +0000 Subject: [PATCH] Fix: don't use exit handler The reason why it worked on Ubuntu 20.04 was that the EXIT handler was not called, while on Ubuntu 24.04 it correctly is. --- compiler/pash_runtime.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/pash_runtime.sh b/compiler/pash_runtime.sh index df9afd581..45f008ee3 100755 --- a/compiler/pash_runtime.sh +++ b/compiler/pash_runtime.sh @@ -141,9 +141,10 @@ else pash_redir_output echo "$$: (5) BaSh script exited with ec: $pash_runtime_final_status" else function run_parallel() { - trap inform_daemon_exit SIGTERM SIGINT EXIT + trap inform_daemon_exit SIGTERM SIGINT export SCRIPT_TO_EXECUTE="$pash_script_to_execute" source "$RUNTIME_DIR/pash_restore_state_and_execute.sh" + inform_daemon_exit } # Should we redirect errors aswell? # TODO: capturing the return state here isn't completely correct.