mirror of
https://github.com/postgres/postgres.git
synced 2025-08-17 01:02:17 +03:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user