projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6fb7fb
)
Avoid file descriptor leak in pg_test_fsync.
author
Robert Haas
Wed, 19 Nov 2014 16:57:54 +0000
(11:57 -0500)
committer
Robert Haas
Wed, 19 Nov 2014 17:14:22 +0000
(12:14 -0500)
This can cause problems on Windows, where files that are still open
can't be unlinked.
Jeff Janes
contrib/pg_test_fsync/pg_test_fsync.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pg_test_fsync/pg_test_fsync.c
b/contrib/pg_test_fsync/pg_test_fsync.c
index b978d9e44efab79e39d685d1ebcd2a61205d3d66..9f9c1d4d775ba40c7eb87788a7f861fe856492fc 100644
(file)
--- a/
contrib/pg_test_fsync/pg_test_fsync.c
+++ b/
contrib/pg_test_fsync/pg_test_fsync.c
@@
-260,8
+260,6
@@
test_sync(int writes_per_op)
}
else
{
- if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
- die("could not open output file");
START_TIMER;
for (ops = 0; alarm_triggered == false; ops++)
{