aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/miscinit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-04 14:55:17 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-04 14:55:17 +0000
commit9a31c9b7b82fe54a65f7a87507c22bfeb8da3562 (patch)
tree801f4feea8856e5224cdb6c600112ac75cba4de1 /src/backend/utils/init/miscinit.c
parent4171bb869f234281a13bb862d3b1e577bf336242 (diff)
downloadpostgresql-9a31c9b7b82fe54a65f7a87507c22bfeb8da3562.tar.gz
postgresql-9a31c9b7b82fe54a65f7a87507c22bfeb8da3562.zip
Suppress getppid test on WIN32, per Dave Page.
Diffstat (limited to 'src/backend/utils/init/miscinit.c')
-rw-r--r--src/backend/utils/init/miscinit.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 5136e39f44b..346ae3b9516 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.133 2004/10/01 18:30:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.134 2004/10/04 14:55:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -538,10 +538,17 @@ CreateLockFile(const char *filename, bool amPostmaster,
* then all but the immediate parent shell will be root-owned processes
* and so the kill test will fail with EPERM.
*
+ * Windows hasn't got getppid(), but doesn't need it since it's not
+ * using real kill() either...
+ *
* Normally kill() will fail with ESRCH if the given PID doesn't
* exist. BeOS returns EINVAL for some silly reason, however.
*/
- if (other_pid != my_pid && other_pid != getppid())
+ if (other_pid != my_pid
+#ifndef WIN32
+ && other_pid != getppid()
+#endif
+ )
{
if (kill(other_pid, 0) == 0 ||
(errno != ESRCH