From 0c58c357d2b3288c4a4502d5ac2ecd34cc441f4f Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Thu, 24 Jun 2021 12:33:35 -0400 Subject: handle SIGINT --- tmpoverlay | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmpoverlay b/tmpoverlay index b2fe6d9..e817e87 100755 --- a/tmpoverlay +++ b/tmpoverlay @@ -134,9 +134,10 @@ esac mount -t tmpfs ${tmpfs_opts:+-o "$tmpfs_opts"} $verbose tmpfs "$tmpdir" || { rmdir "$tmpdir"; die; } mkfifo "$tmpdir/fifo" || { umount "$tmpdir"; rmdir "$tmpdir"; die; } # subshell allows cleanup after overmount /tmp without using realpath source -# subshell also avoids trapping signals which is annoying in shell +# subshell also avoids trapping and re-raising signals which is annoying in shell ( cd "$tmpdir" || die + trap '' INT || die exec