about summary refs log tree commit diff
path: root/src/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/syslog.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/misc/syslog.c b/src/misc/syslog.c
index a4f36dee..8de34f8d 100644
--- a/src/misc/syslog.c
+++ b/src/misc/syslog.c
@@ -51,8 +51,7 @@ static void __openlog(const char *ident, int opt, int facility)
 
 	if (!(opt & LOG_NDELAY) || log_fd>=0) return;
 
-	log_fd = socket(AF_UNIX, SOCK_DGRAM, 0);
-	fcntl(log_fd, F_SETFD, FD_CLOEXEC);
+	log_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
 }
 
 void openlog(const char *ident, int opt, int facility)