summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/syslog_r.c')
-rw-r--r--lib/libc/gen/syslog_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/syslog_r.c b/lib/libc/gen/syslog_r.c
index 2a966a4ba62..e74479f244d 100644
--- a/lib/libc/gen/syslog_r.c
+++ b/lib/libc/gen/syslog_r.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslog_r.c,v 1.3 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: syslog_r.c,v 1.4 2013/04/29 00:28:23 okan Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -279,7 +279,7 @@ connectlog_r(struct syslog_data *data)
if (data->log_file == -1) {
if ((data->log_file = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1)
return;
- (void)fcntl(data->log_file, F_SETFD, 1);
+ (void)fcntl(data->log_file, F_SETFD, FD_CLOEXEC);
}
if (data->log_file != -1 && !data->connected) {
memset(&SyslogAddr, '\0', sizeof(SyslogAddr));