diff options
author | 2004-09-23 01:53:07 +0000 | |
---|---|---|
committer | 2004-09-23 01:53:07 +0000 | |
commit | 9aa53c001691d5bc59e790712048abb5b6eeea53 (patch) | |
tree | 7e276b039a25bd86ebe8bd0a6e241a0505184637 | |
parent | the following patch fixes a bug preventing midi uarts that do (diff) | |
download | wireguard-openbsd-9aa53c001691d5bc59e790712048abb5b6eeea53.tar.xz wireguard-openbsd-9aa53c001691d5bc59e790712048abb5b6eeea53.zip |
reset chld_pid to 0 when acting upon a SIGCHLD so we don't try to send it
a kill then - tiny possible race there
pointed out by Brian Poole <raj@cerias.purdue.edu>
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index a87f908b5a4..bedfa073a54 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.21 2004/09/18 23:21:35 henning Exp $ */ +/* $OpenBSD: ntpd.c,v 1.22 2004/09/23 01:53:07 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -186,8 +186,10 @@ main(int argc, char *argv[]) } if (sigchld) { - if (check_child(chld_pid, "child")) + if (check_child(chld_pid, "child")) { quit = 1; + chld_pid = 0; + } sigchld = 0; } |