Re: nessus-core/nessusd utils.c,1.117,1.118

Thomas Arendsen Hein <[email protected]> Sat, 30 Apr 2005 12:27:37 +0200
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
* [email protected] <[email protected]> [20050430 11:07]:
> Update of /usr/local/cvs/nessus-core/nessusd
> 
> Modified Files:
> 	utils.c 
> Log Message:
> Paranoia in wait_for_children1: clear errno before calling waitpid.
> This might be the cause of an infinite loop I got.
> 
> Index: utils.c
> ===================================================================
> RCS file: /usr/local/cvs/nessus-core/nessusd/utils.c,v
> retrieving revision 1.117
> retrieving revision 1.118
> diff -u -d -r1.117 -r1.118
> --- utils.c	23 Mar 2005 19:22:30 -0000	1.117
> +++ utils.c	30 Apr 2005 09:07:37 -0000	1.118
> @@ -500,7 +500,9 @@
>  void wait_for_children1()
>  {
>   int e;
> - do {
> - e = waitpid(-1, NULL, WNOHANG);
> - } while ( e > 0 || errno == EINTR );
> + do
> +   {
> +     errno = 0;
> +     e = waitpid(-1, NULL, WNOHANG);
> +   } while ( e > 0 || errno == EINTR );
>  }

This doesn't help on our server with bug #1199, I still get 100%
CPU after completing the scan.

Thomas

-- 
Email: [email protected]
http://intevation.de/~thomas/
_______________________________________________
Nessus-devel mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus-devel