From 761b5bd202c7b86564b3341df984169906efb4bf Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Wed, 26 Oct 2022 11:02:33 +0100 Subject: [PATCH] dotoold: fix background process not being killed --- dotoold | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dotoold b/dotoold index e5d9cf6..110bb6b 100755 --- a/dotoold +++ b/dotoold @@ -19,8 +19,7 @@ if fifo_being_read "$p" 2> /dev/null; then fi rm -rf "$p" || exit 1 -trap 'rm -rf "$p"; trap - EXIT; exit' EXIT INT TERM HUP +trap 'rm -rf "$p"; pkill -P $$; trap - EXIT; exit' EXIT INT TERM HUP mkfifo -m 660 "$p" || exit 1 dotool <> "$p" & wait -pkill -P $$