git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c242502)
Add a failure check for syslogger's use of _beginthreadex(), and remove
Tue, 3 Feb 2009 00:59:26 +0000 (00:59 +0000)
Tue, 3 Feb 2009 00:59:26 +0000 (00:59 +0000)
unnecessary thread address output parameter, to make this code look more
like that in pg_restore.


diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c
index df05b88295160e618824361292ee5afa923480b5..5c9eb1654f794c9b0f1cc8f798aaafe42bef989c 100644 (file)
--- a/src/backend/postmaster/syslogger.c
+++ b/src/backend/postmaster/syslogger.c
@@ -18,7 +18,7 @@
*
*
* 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[])
/* Fire up separate data transfer thread */
InitializeCriticalSection(&sysfileSection);
- {
- unsigned int tid;
-
- threadHandle = (HANDLE) _beginthreadex(0, 0, pipeThread, 0, 0, &tid);
- }
+ threadHandle = (HANDLE) _beginthreadex(NULL, 0, pipeThread, NULL, 0, NULL);
+ if (threadHandle == 0)
+ elog(FATAL, "could not create syslogger data transfer thread: %m");
#endif /* WIN32 */
/* remember active logfile parameters */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /