Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2a2f75

Browse files
committed
Avoid double close of file handle in syslogger on win32
This causes an exception when running under a debugger or in particularwhen running on a debug version of Windows.Patch from MauMau
1 parent6b044cb commitc2a2f75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/postmaster/syslogger.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,11 @@ SysLogger_Start(void)
588588
errmsg("could not redirect stderr: %m")));
589589
close(fd);
590590
_setmode(_fileno(stderr),_O_BINARY);
591-
/* Now we are done with the write end of the pipe. */
592-
CloseHandle(syslogPipe[1]);
591+
/*
592+
* Now we are done with the write end of the pipe.
593+
* CloseHandle() must not be called because the preceding
594+
* close() closes the underlying handle.
595+
*/
593596
syslogPipe[1]=0;
594597
#endif
595598
redirection_done= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp