projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f2930e
)
Don't try to close negative file descriptors, since this can cause
author
Magnus Hagander
<
[email protected]
>
Tue, 13 May 2008 20:53:58 +0000
(20:53 +0000)
committer
Magnus Hagander
<
[email protected]
>
Tue, 13 May 2008 20:53:58 +0000
(20:53 +0000)
crashes on certain platforms. In particular, the MSVC runtime is known
to do this.
Fixes bug #4162, reported and diagnosed by Javier Pimas
src/backend/access/transam/xlog.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/transam/xlog.c
b/src/backend/access/transam/xlog.c
index fb958cc7eebea173c076255f80cdf494efe6191d..288936eb65067320c556604d8365f69f1d9cbec7 100644
(file)
--- a/
src/backend/access/transam/xlog.c
+++ b/
src/backend/access/transam/xlog.c
@@
-2934,8
+2934,11
@@
got_record:;
return (XLogRecord *) buffer;
next_record_is_invalid:;
- close(readFile);
- readFile = -1;
+ if (readFile >= 0)
+ {
+ close(readFile);
+ readFile = -1;
+ }
nextRecord = NULL;
return NULL;
}