Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Nessus: devel
nessusd defunct procs fix
 

Index | Next | Previous | View Flat


jcmurphy at oss

Sep 15, 2004, 6:20 AM


Views: 934
Permalink
nessusd defunct procs fix

under load, we've seen nessusd leave a number of defunct processes.
we're proposing that wait_for_children() in pluginlaunch.c be changed
from:


void
wait_for_children(int sig)
{
int i;
for(i = 0 ; i < MAX_PROCESSES ; i ++)
{
int ret;
if(processes[i].pid != 0)
{
do {
ret = waitpid(processes[i].pid, NULL, WNOHANG);
} while(ret < 0 && errno == EINTR);
}

}
}



to

void
wait_for_children(int sig)
{
(void) waitpid(-1, NULL, WNOHANG);
}


the exit status of children seems to be ignored, and collecting the exit
status for any child, rather than just those on the list, appears to
stop the defunct processes from appearing.

jeff

Subject User Time
nessusd defunct procs fix jcmurphy at oss Sep 15, 2004, 6:20 AM
    Re: nessusd defunct procs fix deraison at nessus Sep 15, 2004, 7:41 AM
        Re: nessusd defunct procs fix jcmurphy at oss Sep 15, 2004, 11:21 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.