libroot: Fix open flags in shm_open.

We need O_CLOEXEC here, not FD_CLOEXEC (which is equal to 0x1, which
in openflags is O_WRONLY and thus leads to the conflicts caught by
the previous commit.)

Fixes haikuports/haikuports#7524.
(cherry picked from commit 59e09f7bebcb8fa9d4ed82f501e6516c3d67d65b)

Change-Id: I5751822ac48ae7a865755494da241e4bfd34c45f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5853
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2022-12-07 22:59:58 +00:00
committed by waddlesplash
parent 7cc1c1af2e
commit 140013f27a
+1 -1
View File
@@ -216,7 +216,7 @@ shm_open(const char* name, int openMode, mode_t permissions)
if (error != B_OK)
RETURN_AND_SET_ERRNO(error);
return open(path, openMode | FD_CLOEXEC, permissions);
return open(path, openMode | O_CLOEXEC, permissions);
}