mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Avoid double close of file handle in syslogger on win32
This causes an exception when running under a debugger or in particular when running on a debug version of Windows. Patch from MauMau
This commit is contained in:
parent
6b044cb810
commit
c2a2f7516b
@ -588,8 +588,11 @@ SysLogger_Start(void)
|
||||
errmsg("could not redirect stderr: %m")));
|
||||
close(fd);
|
||||
_setmode(_fileno(stderr), _O_BINARY);
|
||||
/* Now we are done with the write end of the pipe. */
|
||||
CloseHandle(syslogPipe[1]);
|
||||
/*
|
||||
* Now we are done with the write end of the pipe.
|
||||
* CloseHandle() must not be called because the preceding
|
||||
* close() closes the underlying handle.
|
||||
*/
|
||||
syslogPipe[1] = 0;
|
||||
#endif
|
||||
redirection_done = true;
|
||||
|
Loading…
Reference in New Issue
Block a user