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

Commitd1ed336

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 parent29f65a8 commitd1ed336

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
@@ -593,8 +593,11 @@ SysLogger_Start(void)
593593
errmsg("could not redirect stderr: %m")));
594594
close(fd);
595595
_setmode(_fileno(stderr),_O_BINARY);
596-
/* Now we are done with the write end of the pipe. */
597-
CloseHandle(syslogPipe[1]);
596+
/*
597+
* Now we are done with the write end of the pipe.
598+
* CloseHandle() must not be called because the preceding
599+
* close() closes the underlying handle.
600+
*/
598601
syslogPipe[1]=0;
599602
#endif
600603
redirection_done= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp