DEADSOFTWARE

flush called only for exclusive-mode files
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sat, 15 Jun 2019 21:43:06 +0000 (00:43 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sat, 15 Jun 2019 21:43:06 +0000 (00:43 +0300)
src/posix/generic/Host/Mod/Files.cp

index 19517f242be6beb03c5d0e9d36b8c4ba6c80b1ed..8b0fc0058d30c7ae1f699bcf69d5b42eba55dbbb 100644 (file)
@@ -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