|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * 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 $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -538,10 +538,17 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
538 | 538 | * then all but the immediate parent shell will be root-owned processes
|
539 | 539 | * and so the kill test will fail with EPERM.
|
540 | 540 | *
|
| 541 | + * Windows hasn't got getppid(), but doesn't need it since it's not |
| 542 | + * using real kill() either... |
| 543 | + * |
541 | 544 | * Normally kill() will fail with ESRCH if the given PID doesn't
|
542 | 545 | * exist. BeOS returns EINVAL for some silly reason, however.
|
543 | 546 | */
|
544 |
| -if (other_pid!=my_pid&&other_pid!=getppid()) |
| 547 | +if (other_pid!=my_pid |
| 548 | +#ifndefWIN32 |
| 549 | +&&other_pid!=getppid() |
| 550 | +#endif |
| 551 | +) |
545 | 552 | {
|
546 | 553 | if (kill(other_pid,0)==0||
|
547 | 554 | (errno!=ESRCH
|
|