diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 02:54:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 02:54:54 -0700 |
commit | f9c39b7ae8218121f16e1b0b7f70c1cff52a56c0 (patch) | |
tree | da7986af67af78e6d12f5e65ed9ee2ee71b58994 | |
parent | 159d6101904ca8af97c2bc741fefb2be39983799 (diff) | |
download | cppawk-f9c39b7ae8218121f16e1b0b7f70c1cff52a56c0.tar.gz cppawk-f9c39b7ae8218121f16e1b0b7f70c1cff52a56c0.tar.bz2 cppawk-f9c39b7ae8218121f16e1b0b7f70c1cff52a56c0.zip |
bugfix: execing awk causes temp files to persist.
-rwxr-xr-x | cppawk | 2 | ||||
-rw-r--r-- | testcases | 5 | ||||
-rwxr-xr-x | testdir/testdel | 3 |
3 files changed, 9 insertions, 1 deletions
@@ -151,7 +151,7 @@ while [ $# -gt 0 ] ; do shift done -awk="exec $(quote "$awk")" +awk="command $(quote "$awk")" prepro="command $(quote "$prepro")" trap 'rm -f $tmp_file' EXIT INT TERM @@ -200,3 +200,8 @@ gawk=__gawk__ ./cppawk --prepro=die --prepro-only x 2>&1 | grep 'not found' : ./cppawk: 1: eval: die: not found +-- +37: +tmp=$(./cppawk --awk=testdir/testdel 1); [ -e $tmp ] || echo gone +: +gone diff --git a/testdir/testdel b/testdir/testdel new file mode 100755 index 0000000..f6339c8 --- /dev/null +++ b/testdir/testdel @@ -0,0 +1,3 @@ +#!/bin/sh +[ "$1" = "-f" ] || exit 1 +printf "%s\n" "$2" |