Commit 623cf5ed authored by Tom Lane's avatar Tom Lane

Add a failure check for syslogger's use of _beginthreadex(), and remove

unnecessary thread address output parameter, to make this code look more
like that in pg_restore.
parent c2425020
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.47 2009/01/01 17:23:46 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.48 2009/02/03 00:59:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -267,11 +267,9 @@ SysLoggerMain(int argc, char *argv[]) ...@@ -267,11 +267,9 @@ SysLoggerMain(int argc, char *argv[])
/* Fire up separate data transfer thread */ /* Fire up separate data transfer thread */
InitializeCriticalSection(&sysfileSection); InitializeCriticalSection(&sysfileSection);
{ threadHandle = (HANDLE) _beginthreadex(NULL, 0, pipeThread, NULL, 0, NULL);
unsigned int tid; if (threadHandle == 0)
elog(FATAL, "could not create syslogger data transfer thread: %m");
threadHandle = (HANDLE) _beginthreadex(0, 0, pipeThread, 0, 0, &tid);
}
#endif /* WIN32 */ #endif /* WIN32 */
/* remember active logfile parameters */ /* remember active logfile parameters */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment