summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r--usr.sbin/ntpd/ntp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index c02cf8dc269..f4c6c88c6d6 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.115 2011/06/16 11:46:55 henning Exp $ */
+/* $OpenBSD: ntp.c,v 1.116 2011/06/17 18:12:05 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -110,6 +110,7 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf, struct passwd *pw)
fatal(NULL);
hotplugfd = sensor_hotplugfd();
+ close(pipe_prnt[0]);
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1)
fatal("socketpair");
dns_pid = ntp_dns(pipe_dns, nconf, pw);
@@ -150,7 +151,6 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf, struct passwd *pw)
signal(SIGHUP, SIG_IGN);
signal(SIGCHLD, SIG_DFL);
- close(pipe_prnt[0]);
if ((ibuf_main = malloc(sizeof(struct imsgbuf))) == NULL)
fatal(NULL);
imsg_init(ibuf_main, pipe_prnt[1]);