os2 linux: fix order of operations bug in _open; fix process_info routine

This commit is contained in:
jason
2024-07-23 17:50:30 -04:00
parent 3c7d1f35db
commit 82deaa59ad
2 changed files with 24 additions and 25 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ _open :: proc(name: string, flags: File_Flags, perm: int) -> (f: ^File, err: Err
// terminal would be incredibly rare. This has no effect on files while
// allowing us to open serial devices.
sys_flags: linux.Open_Flags = {.NOCTTY, .CLOEXEC}
switch flags & O_RDONLY|O_WRONLY|O_RDWR {
switch flags & (O_RDONLY|O_WRONLY|O_RDWR) {
case O_RDONLY:
case O_WRONLY: sys_flags += {.WRONLY}
case O_RDWR: sys_flags += {.RDWR}