diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-11-20 20:07:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-11-20 20:07:24 +0000 |
commit | c12d8edf76feff3c9a77bd243c492ded5225c01d (patch) | |
tree | 3d539d7a797081ea5c71e4cd22964be26aded79c /usr.bin/ssh | |
parent | fa858c49f8dede69ec1f4d3680d0b451562a40e7 (diff) |
fix sigchld race; cjc5@po.cwru.edu
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index d085e4d3857..d06372a19c6 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -18,7 +18,7 @@ agent connections. */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.59 1999/11/19 19:58:18 markus Exp $"); +RCSID("$Id: sshd.c,v 1.60 1999/11/20 20:07:23 deraadt Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -170,7 +170,10 @@ void main_sigchld_handler(int sig) { int save_errno = errno; int status; - wait(&status); + + while (waitpid(-1, &status, WNOHANG) > 0) + ; + signal(SIGCHLD, main_sigchld_handler); errno = save_errno; } |