From: Andrew Tridgell Date: Tue, 17 Jul 2001 10:48:31 +0000 (+0000) Subject: reap children in sigchld handler X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/029c171330dff85dc651060b09ee6e7de8b02a6a reap children in sigchld handler --- diff --git a/main.c b/main.c index 38df5a0d..4ecf46d1 100644 --- a/main.c +++ b/main.c @@ -700,6 +700,9 @@ static RETSIGTYPE sigusr2_handler(int val) { } static RETSIGTYPE sigchld_handler(int val) { +#ifdef WNOHANG + while (waitpid(-1, NULL, WNOHANG) > 0) ; +#endif } int main(int argc,char *argv[])