Add missing flush functionality to os platforms
Platforms: - FreeBSD - Haiku - Linux - NetBSD - OpenBSD
This commit is contained in:
1 parent
3ec4db212b
commit
0243647e15
6 files changed
+28
-7
No files matched your search
@@ -584,8 +584,7 @@ close :: proc(fd: Handle) -> Error {
|
||||
}
|
||||
|
||||
flush :: proc(fd: Handle) -> Error {
|
||||
// do nothing
|
||||
return nil
|
||||
return _get_errno(unix.sys_fsync(int(fd)))
|
||||
}
|
||||
|
||||
// If you read or write more than `SSIZE_MAX` bytes, result is implementation defined (probably an error).
|
||||
|
||||
Reference in new issue
Block a user