diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-06-21 07:42:01 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-06-21 07:42:01 +0000 |
commit | db9d1e1c3fa9e2ad1bcc5f77c3e13ae23b4509a2 (patch) | |
tree | 64ae3f49d703e52fe19c906b6939108395cec05d /usr.sbin/ntpd/ntp.c | |
parent | 8ce952b092ccda5e22707116504f050027470c9b (diff) |
avoid a race by installing SIGCHLD handler before fork() is called.
ok henning@ ckuethe@
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index b970c1f9b80..631a1a8eda3 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.87 2006/06/17 18:40:42 otto Exp $ */ +/* $OpenBSD: ntp.c,v 1.88 2006/06/21 07:42:00 otto Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -139,6 +139,7 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) signal(SIGINT, ntp_sighdlr); signal(SIGPIPE, SIG_IGN); signal(SIGHUP, SIG_IGN); + signal(SIGCHLD, SIG_DFL); close(pipe_prnt[0]); if ((ibuf_main = malloc(sizeof(struct imsgbuf))) == NULL) |