summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-12-21 06:30:32 -0500
committerRobert Haas <rhaas@postgresql.org>2010-12-21 06:30:32 -0500
commit24ecde7742cd4d7c781e6890b07571fff42b25dc (patch)
treebeef3e35e6b59ba7371f9e8dd8f00e957e85f723 /src/backend/access/gist/gistxlog.c
parentf6a0863e3cb72763490ceca2c558d5ef2dddd5f2 (diff)
downloadpostgresql-24ecde7742cd4d7c781e6890b07571fff42b25dc.tar.gz
Work around unfortunate getppid() behavior on BSD-ish systems.
On MacOS X, and apparently also on other BSD-derived systems, attaching a debugger causes getppid() to return the pid of the debugging process rather than the actual parent PID. As a result, debugging the autovacuum launcher, startup process, or WAL sender on such systems causes it to exit, because the previous coding of PostmasterIsAlive() detects postmaster death by testing whether getppid() == PostmasterPid. Work around that behavior by checking the return value of getppid() more carefully. If it's PostmasterPid, the postmaster must be alive; if it's 1, assume the postmaster is dead. If it's any other value, assume we've been debugged and fall through to the less-reliable kill() test. Review by Tom Lane.
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions