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

Commit72e2db8

Browse files
committed
Don't try to close negative file descriptors, since this can cause
crashes on certain platforms. In particular, the MSVC runtime is knownto do this.Fixes bug #4162, reported and diagnosed by Javier Pimas
1 parentd82a1d5 commit72e2db8

File tree

1 file changed

+6
-3
lines changed
  • src/backend/access/transam

1 file changed

+6
-3
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.307 2008/05/12 19:45:23 mha Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.308 2008/05/13 20:53:52 mha Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -3334,8 +3334,11 @@ got_record:;
33343334
return (XLogRecord*)buffer;
33353335

33363336
next_record_is_invalid:;
3337-
close(readFile);
3338-
readFile=-1;
3337+
if (readFile >=0)
3338+
{
3339+
close(readFile);
3340+
readFile=-1;
3341+
}
33393342
nextRecord=NULL;
33403343
returnNULL;
33413344
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp