Browse Source

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>
OPENBSD_3_7
henning 20 years ago
parent
commit
75dafda684
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/usr.sbin/ntpd/ntpd.c

+ 4
- 2
src/usr.sbin/ntpd/ntpd.c View File

@ -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;
}


Loading…
Cancel
Save