diff options
| author | Beau McCartney <mccartney.beausl@gmail.com> | 2024-03-19 09:36:49 -0600 |
|---|---|---|
| committer | Beau McCartney <mccartney.beausl@gmail.com> | 2024-03-19 09:36:49 -0600 |
| commit | 43e8da2e067c6a2ecbc663bfbae0eafe67dc41e1 (patch) | |
| tree | 8e2ad87f05ac2015490c2213600c781995ecbcce | |
| parent | 1758bd683e8e3dbceaa79e0cfc5da437f48be87e (diff) | |
shm_open: comment with notes abt permissions
| -rw-r--r-- | core/sys/darwin/xnu_system_call_helpers.odin | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/sys/darwin/xnu_system_call_helpers.odin b/core/sys/darwin/xnu_system_call_helpers.odin index e253a0cd9..19e38ce56 100644 --- a/core/sys/darwin/xnu_system_call_helpers.odin +++ b/core/sys/darwin/xnu_system_call_helpers.odin @@ -206,6 +206,11 @@ sys_shm_open :: proc(name: string, oflag: Open_Flags, mode: Permission) -> (c.in result := syscall_shm_open(cname, cmode, cflags) state := result != -1 + // NOTE(beau): Presently fstat doesn't report any changed permissions + // on the file descriptor even with this fchmod (which fails with a + // non-zero return). I can also reproduce this with the syscalls in c + // so I suspect it's not odin's bug. I've left the fchmod in case the + // underlying issue is fixed. if state && cflags != 0 { state = (syscall_fchmod(result, cflags) != -1) } |