aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-21 21:43:53 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-21 21:43:53 +0200
commit30513b181895cfa1a9035514aabf49c43c5bf0ea (patch)
tree96bd9f1c00dc0cb7d095a95cb3985215c83e2915 /etc
parentde3ef325f73885003d05d3937293661be3c84b21 (diff)
downloadxutil-30513b181895cfa1a9035514aabf49c43c5bf0ea.tar.gz
ep: Ensure temporary file is removed
Diffstat (limited to 'etc')
-rwxr-xr-xetc/ep2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/ep b/etc/ep
index 4be6317..9ee3e69 100755
--- a/etc/ep
+++ b/etc/ep
@@ -3,7 +3,7 @@
# ep -- edit pipe
tmp=`mktemp /tmp/ep.XXXXXX`
+trap "rm $tmp; trap -" INT QUIT EXIT
cat > $tmp
${EDITOR:-vi} $tmp < /dev/tty > /dev/tty
cat $tmp
-rm $tmp