Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
cf553911
Commit
cf553911
authored
Dec 12, 2004
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problems with certain shells (e.g., FreeBSD, Cygwin) clearing the
exit status in multiline traps.
parent
984791e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/test/regress/pg_regress.sh
src/test/regress/pg_regress.sh
+11
-7
No files found.
src/test/regress/pg_regress.sh
View file @
cf553911
#! /bin/sh
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.5
0 2004/11/17 18:06:04 tgl
Exp $
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.5
1 2004/12/12 15:34:15 petere
Exp $
me
=
`
basename
$0
`
:
${
TMPDIR
=/tmp
}
...
...
@@ -238,18 +238,20 @@ PGDATESTYLE='ISO, MDY'; export PGDATESTYLE
# with the result of the last shell command before the `exit'. Hence
# we have to write `(exit x); exit' below this point.
trap
'
savestatus=$
?
exit_trap
(){
savestatus
=
$
1
if
[
-n
"
$postmaster_pid
"
]
;
then
kill
-2
"
$postmaster_pid
"
wait
"
$postmaster_pid
"
unset
postmaster_pid
fi
rm
-f
"
$TMPFILE
"
&&
exit
$savestatus
'
0
}
trap
'exit_trap $?'
0
trap
'
savestatus=$
?
sig_trap
()
{
savestatus
=
$
1
echo
;
echo
"caught signal"
if
[
-n
"
$postmaster_pid
"
]
;
then
echo
"signalling fast shutdown to postmaster with pid
$postmaster_pid
"
...
...
@@ -258,7 +260,9 @@ trap '
unset
postmaster_pid
fi
(
exit
$savestatus
)
;
exit
'
1 2 13 15
}
trap
'sig_trap $?'
1 2 13 15
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment