File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- # $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.50 2004/11/17 18:06:04 tgl Exp $
2
+ # $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.51 2004/12/12 15:34:15 petere Exp $
3
3
4
4
me=` basename $0 `
5
5
: ${TMPDIR=/ tmp}
@@ -238,18 +238,20 @@ PGDATESTYLE='ISO, MDY'; export PGDATESTYLE
238
238
# with the result of the last shell command before the `exit'. Hence
239
239
# we have to write `(exit x); exit' below this point.
240
240
241
- trap '
242
- savestatus=$?
241
+ exit_trap (){
242
+ savestatus=$1
243
243
if [ -n " $postmaster_pid " ]; then
244
244
kill -2 " $postmaster_pid "
245
245
wait " $postmaster_pid "
246
246
unset postmaster_pid
247
247
fi
248
248
rm -f " $TMPFILE " && exit $savestatus
249
- ' 0
249
+ }
250
+
251
+ trap ' exit_trap $?' 0
250
252
251
- trap '
252
- savestatus=$?
253
+ sig_trap () {
254
+ savestatus=$1
253
255
echo ; echo " caught signal"
254
256
if [ -n " $postmaster_pid " ]; then
255
257
echo " signalling fast shutdown to postmaster with pid $postmaster_pid "
@@ -258,7 +260,9 @@ trap '
258
260
unset postmaster_pid
259
261
fi
260
262
(exit $savestatus ); exit
261
- ' 1 2 13 15
263
+ }
264
+
265
+ trap ' sig_trap $?' 1 2 13 15
262
266
263
267
264
268
You can’t perform that action at this time.
0 commit comments