Skip to content

Commit

Permalink
fix launcher script terminating before child terminates on SIGTERM
Browse files Browse the repository at this point in the history
  • Loading branch information
Schibum authored and Alex Eagle committed Nov 25, 2020
1 parent 11ef188 commit 2c73fde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/node/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ readonly child=$!
trap _term SIGTERM
trap _int SIGINT
wait "${child}"
# Remove trap after first signal has been receieved and wait for child to exit
# (first wait returns immediatel if SIGTERM is received while waiting). Second
# wait is a no-op if child has already terminated.
trap - SIGTERM SIGINT
wait "${child}"

RESULT="$?"
set -e

Expand Down

0 comments on commit 2c73fde

Please sign in to comment.