postgres.git / summary / log / commit / refs
commit 8cf825974cd10323013f3be0ed1cd35176fbe364
Author: Robert Haas <rhaas@postgresql.org>
Date: Wed Nov 19 16:57:54 2014 +0000
First released in: 9.5.0, 9.1.15, 9.2.10, 9.3.6, 9.4.0
Avoid file descriptor leak in pg_test_fsync.
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 | 2 --
1 file changed, 2 deletions(-)
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c
index b978d9e44ef..9f9c1d4d775 100644
--- 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++)
{
[parent: f6fb7fb17d89]