diff options
| author | Alvaro Herrera | 2022-09-20 16:50:16 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2022-09-20 16:50:16 +0000 |
| commit | 3d53b9ef1a4cda7b6303a0496f8531eceeef0e77 (patch) | |
| tree | e9d89ace40c397ec331edd76cda894b34977c3fb /src/tools/pgtest | |
| parent | 152c9f7b8f01437780d9f87bfe945bba47efdd0a (diff) | |
Fix `trap` in a few shell scripts
The original `trap` lines in these scripts are incomplete: in case of
any signal, they delete the working directory but let the script run to
completion, which is useless because it will only proceed to complain
about the working directory being removed. Add `exit` there, with the
original exit value (not rm's).
Since this is mostly just cosmetic, no backpatch.
Discussion: https://postgr.es/m/20220913181002.hzsosy7qkemb7ky7@alvherre.pgsql
Diffstat (limited to 'src/tools/pgtest')
| -rwxr-xr-x | src/tools/pgtest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/pgtest b/src/tools/pgtest index 70f6a62ad0..fa665ff817 100755 --- a/src/tools/pgtest +++ b/src/tools/pgtest @@ -14,7 +14,7 @@ MAKE="make" [ ! -d src ] && echo "This must be run from the top of the PostgreSQL source tree" 1>&2 && exit 1 -trap "rm -rf /tmp/$$" 0 1 2 3 15 +trap "ret=$?; rm -rf /tmp/$$; exit $ret" 0 1 2 3 15 mkdir /tmp/$$ TMP="/tmp/$$" |
