POSIX: shm_open: set the FD_CLOEXEC file descriptor flag...

on the new file descriptor.
Fixes #13774.
This commit is contained in:
Jérôme Duval
2017-11-16 16:46:37 +01:00
parent be149e8ccf
commit 0e9000201f
+1 -1
View File
@@ -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);
}