diff --git a/src/usr.sbin/ntpd/ntp.c b/src/usr.sbin/ntpd/ntp.c index c02cf8dc..f4c6c88c 100644 --- a/src/usr.sbin/ntpd/ntp.c +++ b/src/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 @@ -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]);