summaryrefslogtreecommitdiff
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2011-07-09 14:49:15 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2011-07-09 14:49:15 +0000
commit67d0eec9bdf5d87f5dd1db778e4b059bcbd32c8d (patch)
tree6cf62a75db8ed21afa3e3818b5c67a1f3912d6d4 /usr.sbin/cron
parent75b8ea03ec9c63eb8233b9459fef47d85adc2a27 (diff)
use FD_CLOEXEC instead of 1.
ok millert
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c
index 204b3429f85..af5792382c4 100644
--- a/usr.sbin/cron/misc.c
+++ b/usr.sbin/cron/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.42 2010/04/10 16:43:18 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.43 2011/07/09 14:49:14 dhill Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -291,7 +291,7 @@ acquire_daemonlock(int closeflag) {
close(fd);
fd = STDERR + 1;
}
- (void) fcntl(fd, F_SETFD, 1);
+ (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
}
snprintf(buf, sizeof(buf), "%ld\n", (long)getpid());
@@ -466,7 +466,7 @@ log_it(const char *username, PID_T xpid, const char *event, const char *detail)
ProgramName);
perror(LOG_FILE);
} else {
- (void) fcntl(LogFD, F_SETFD, 1);
+ (void) fcntl(LogFD, F_SETFD, FD_CLOEXEC);
}
}