summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/utmp/utent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index 945571733..cb5700fc7 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -60,7 +60,7 @@ void setutent(void)
/* Make sure the file will be closed on exec() */
ret = fcntl(static_fd, F_GETFD, 0);
if (ret >= 0) {
- ret = fcntl(static_fd, F_GETFD, 0);
+ ret = fcntl(static_fd, F_SETFD, ret | FD_CLOEXEC);
}
if (ret < 0) {
bummer: