diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-03-18 18:22:08 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-03-18 18:22:08 +0000 |
commit | 4bd983bf346195343ab94cfe80b52af9fde1a03a (patch) | |
tree | c8d1172ff0c67d6b19076a7f53c5350ced923bff /src/backend/utils/init/miscinit.c | |
parent | 5c1b00450c9b6c0e1f70db26e92fd79f7119223b (diff) | |
download | postgresql-4bd983bf346195343ab94cfe80b52af9fde1a03a.tar.gz postgresql-4bd983bf346195343ab94cfe80b52af9fde1a03a.zip |
Patches from Cyril Velter to make shared-memory-conflict-detection code
work in BeOS port.
Diffstat (limited to 'src/backend/utils/init/miscinit.c')
-rw-r--r-- | src/backend/utils/init/miscinit.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index c6192aa0c6e..f5824327c96 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.62 2001/03/13 01:17:06 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.63 2001/03/18 18:22:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -540,11 +540,18 @@ CreateLockFile(const char *filename, bool amPostmaster, /* * Check to see if the other process still exists + * + * 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) { if (kill(other_pid, 0) == 0 || - errno != ESRCH) + (errno != ESRCH +#ifdef __BEOS__ + && errno != EINVAL +#endif + )) { /* lockfile belongs to a live process */ fprintf(stderr, "Lock file \"%s\" already exists.\n", |