POSIX: shm_open: set the FD_CLOEXEC file descriptor flag...
on the new file descriptor. Fixes #13774.
This commit is contained in:
@@ -178,7 +178,7 @@ shm_open(const char* name, int openMode, mode_t permissions)
|
||||
if (error != B_OK)
|
||||
RETURN_AND_SET_ERRNO(error);
|
||||
|
||||
return open(path, openMode, permissions);
|
||||
return open(path, openMode | FD_CLOEXEC, permissions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user