Skip to content

Commit 9a31c9b

Browse files
committed
Suppress getppid test on WIN32, per Dave Page.
1 parent 4171bb8 commit 9a31c9b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/backend/utils/init/miscinit.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.133 2004/10/01 18:30:25 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.134 2004/10/04 14:55:17 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -538,10 +538,17 @@ CreateLockFile(const char *filename, bool amPostmaster,
538538
* then all but the immediate parent shell will be root-owned processes
539539
* and so the kill test will fail with EPERM.
540540
*
541+
* Windows hasn't got getppid(), but doesn't need it since it's not
542+
* using real kill() either...
543+
*
541544
* Normally kill() will fail with ESRCH if the given PID doesn't
542545
* exist. BeOS returns EINVAL for some silly reason, however.
543546
*/
544-
if (other_pid != my_pid && other_pid != getppid())
547+
if (other_pid != my_pid
548+
#ifndef WIN32
549+
&& other_pid != getppid()
550+
#endif
551+
)
545552
{
546553
if (kill(other_pid, 0) == 0 ||
547554
(errno != ESRCH

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy