dotoold: improve signal handling

This commit is contained in:
John Gebbie 2022-10-22 18:37:37 +01:00
parent 217525bf2f
commit 4fb2cb37bf

View file

@ -19,7 +19,8 @@ if fifo_being_read "$p" 2> /dev/null; then
fi fi
rm -rf "$p" || exit 1 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 mkfifo -m 660 "$p" || exit 1
dotool <> "$p" &
dotool <> "$p" wait
pkill -P $$