summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sem_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/sem_new.c')
-rw-r--r--lib/libc/gen/sem_new.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c
index b748b49..b11d547 100644
--- a/lib/libc/gen/sem_new.c
+++ b/lib/libc/gen/sem_new.c
@@ -198,7 +198,7 @@ _sem_open(const char *name, int flags, ...)
goto error;
}
- fd = _open(path, flags|O_RDWR, mode);
+ fd = _open(path, flags|O_RDWR|O_CLOEXEC, mode);
if (fd == -1)
goto error;
if (flock(fd, LOCK_EX) == -1)
OpenPOWER on IntegriCloud