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.
This commit is contained in:
Augustin Cavalier 2022-12-07 17:57:40 -05:00
parent 9bc250e28d
commit 59e09f7beb

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);
}