1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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
This commit is contained in:
Robert Haas
2014-11-19 11:57:54 -05:00
parent f6fb7fb17d
commit 8cf825974c

View File

@ -260,8 +260,6 @@ test_sync(int writes_per_op)
} }
else else
{ {
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
die("could not open output file");
START_TIMER; START_TIMER;
for (ops = 0; alarm_triggered == false; ops++) for (ops = 0; alarm_triggered == false; ops++)
{ {