Browse Source

+ implemented SysUtils.FileClose for WASI

Nikolay Nikolov 3 years ago
parent
commit
aa4070ca8a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      rtl/wasi/sysutils.pp

+ 5 - 0
rtl/wasi/sysutils.pp

@@ -112,7 +112,12 @@ end;
 
 
 Procedure FileClose (Handle : THandle);
+var
+  res: __wasi_errno_t;
 begin
+  repeat
+    res:=__wasi_fd_close(Handle);
+  until (res=__WASI_ERRNO_SUCCESS) or (res<>__WASI_ERRNO_INTR);
 end;