From 7d831abc12050416777f2a9e6d352950af688560 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Sun, 16 Jun 2019 00:43:06 +0300 Subject: [PATCH] flush called only for exclusive-mode files --- src/posix/generic/Host/Mod/Files.cp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/generic/Host/Mod/Files.cp b/src/posix/generic/Host/Mod/Files.cp index 19517f2..8b0fc00 100644 --- a/src/posix/generic/Host/Mod/Files.cp +++ b/src/posix/generic/Host/Mod/Files.cp @@ -141,7 +141,7 @@ MODULE HostFiles; PROCEDURE (f: File) Flush; VAR res: unistd.int; BEGIN - IF f.state # closed THEN + IF f.state = exclusive THEN res := unistd.fsync(f.fd); ASSERT(res = 0, 100) END -- 2.29.2