search for: a54e246

Displaying 1 result from an estimated 1 matches for "a54e246".

Did you mean: 754246
2016 Jan 15
0
[klibc:master] Remove open_cloexec()
...-#include <unistd.h> -#include <fcntl.h> - -int open_cloexec(const char *path, int flags, mode_t mode) -{ - int fd = open(path, flags, mode); - - if (fd >= 0) - fcntl(fd, F_SETFD, FD_CLOEXEC); - - return fd; -} diff --git a/usr/klibc/shm_open.c b/usr/klibc/shm_open.c index 8fe93aa..a54e246 100644 --- a/usr/klibc/shm_open.c +++ b/usr/klibc/shm_open.c @@ -19,5 +19,5 @@ int shm_open(const char *path, int oflag, mode_t mode) memcpy(pathbuf, "/dev/shm/", 9); memcpy(pathbuf+9, path, len+1); - return open_cloexec(path, oflag, mode); + return open(path, oflag, mode|O_CLOEXEC)...