mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-17 08:34:08 +00:00
sys_shm_open: fchmod the returned descriptor to get correct perms
this doesn't happen by default
This commit is contained in:
@@ -206,5 +206,9 @@ sys_shm_open :: proc(name: string, oflag: Open_Flags, mode: Permission) -> (c.in
|
||||
result := syscall_shm_open(cname, cmode, cflags)
|
||||
state := result != -1
|
||||
|
||||
if state && cflags != 0 {
|
||||
state = (syscall_fchmod(result, cflags) != -1)
|
||||
}
|
||||
|
||||
return result * cast(c.int)state, state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user