mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 17:01:20 +02: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:
parent
d5f4df7264
commit
a016555361
@ -258,8 +258,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++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user