summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/pututxline.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/pututxline.c')
-rw-r--r--lib/libc/gen/pututxline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/pututxline.c b/lib/libc/gen/pututxline.c
index 98addee..555386c 100644
--- a/lib/libc/gen/pututxline.c
+++ b/lib/libc/gen/pututxline.c
@@ -47,7 +47,7 @@ futx_open(const char *file)
struct stat sb;
int fd;
- fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK, 0644);
+ fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
if (fd < 0)
return (NULL);
@@ -235,7 +235,7 @@ utx_lastlogin_upgrade(void)
struct stat sb;
int fd;
- fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR, 0644);
+ fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644);
if (fd < 0)
return;
@@ -269,7 +269,7 @@ utx_log_add(const struct futx *fu)
vec[1].iov_len = l;
l = htobe16(l);
- fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644);
+ fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644);
if (fd < 0)
return (-1);
if (_writev(fd, vec, 2) == -1)
OpenPOWER on IntegriCloud