1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Implement new PostmasterIsAlive() check for WIN32, per Claudio Natoli.

In passing, align a few error messages with the style guide.
This commit is contained in:
Tom Lane
2004-05-30 03:50:15 +00:00
parent 076a055acf
commit c6719a2784
3 changed files with 45 additions and 20 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/ipc/pmsignal.c,v 1.14 2004/05/29 22:48:20 tgl Exp $
* $PostgreSQL: pgsql/src/backend/storage/ipc/pmsignal.c,v 1.15 2004/05/30 03:50:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,6 +18,7 @@
#include <unistd.h>
#include "miscadmin.h"
#include "postmaster/postmaster.h"
#include "storage/pmsignal.h"
#include "storage/shmem.h"
@@ -115,9 +116,6 @@ PostmasterIsAlive(bool amDirectChild)
return (kill(PostmasterPid, 0) == 0);
}
#else /* WIN32 */
/*
* XXX needs to be implemented by somebody
*/
return true;
return (WaitForSingleObject(PostmasterHandle, 0) == WAIT_TIMEOUT);
#endif /* WIN32 */
}