aboutsummaryrefslogtreecommitdiff
path: root/src/tools/pginclude/cpluspluscheck
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-20 18:50:16 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-20 18:50:16 +0200
commit3d53b9ef1a4cda7b6303a0496f8531eceeef0e77 (patch)
treee9d89ace40c397ec331edd76cda894b34977c3fb /src/tools/pginclude/cpluspluscheck
parent152c9f7b8f01437780d9f87bfe945bba47efdd0a (diff)
downloadpostgresql-3d53b9ef1a4cda7b6303a0496f8531eceeef0e77.tar.gz
postgresql-3d53b9ef1a4cda7b6303a0496f8531eceeef0e77.zip
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/pginclude/cpluspluscheck')
-rwxr-xr-xsrc/tools/pginclude/cpluspluscheck2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck
index bffca18890c..b393f2a2eaa 100755
--- a/src/tools/pginclude/cpluspluscheck
+++ b/src/tools/pginclude/cpluspluscheck
@@ -50,7 +50,7 @@ done
# Create temp directory.
tmp=`mktemp -d /tmp/$me.XXXXXX`
-trap 'rm -rf $tmp' 0 1 2 3 15
+trap "ret=$?; rm -rf $tmp; exit $ret" 0 1 2 3 15
exit_status=0