From 4fb2cb37bffbb6c34603a29178bd3ad8a64137ff Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Sat, 22 Oct 2022 18:37:37 +0100 Subject: [PATCH] dotoold: improve signal handling --- dotoold | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotoold b/dotoold index 7b245ee..e5d9cf6 100755 --- a/dotoold +++ b/dotoold @@ -19,7 +19,8 @@ if fifo_being_read "$p" 2> /dev/null; then fi rm -rf "$p" || exit 1 -trap 'rm -rf "$p"' EXIT INT TERM HUP +trap 'rm -rf "$p"; trap - EXIT; exit' EXIT INT TERM HUP mkfifo -m 660 "$p" || exit 1 - -dotool <> "$p" +dotool <> "$p" & +wait +pkill -P $$