| Anonymous | Login | Signup for a new account | 11-10-2008 10:49 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000421 | [BusyBox] Other | minor | always | 09-08-05 08:23 | 12-15-05 23:47 | ||||
| Reporter | jamwyatt | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | no change required | ||||||
| Status | closed | Product Version | 1.00 | ||||||
| Summary | 0000421: httpd applet in non-inet mode creates zombies | ||||||||
| Description |
httpd main loop, when not in debug mode forks off children and never reaps their returns codes. I've got a local fix working and have provided an example diff. The solution that I've used was to change the select in the loop to have a 2 second timeout and then add a general waitpid without hang at the end to scan for any children to reap. This isn't the most efficient, as waitpid is run every two seconds or after every incomming request ... not nice behavior if you are handling 1000's of connections, but I suspect most busybox use is not in that category. Robert |
||||||||
| Additional Information |
1989d1988 < struct timeval tm; 1992,1995c1991,1992 < /* Now wait for 2 seconds */ < tm.tv_sec = 2; < tm.tv_usec= 0; < if (select(server + 1, &readfd, 0, 0, &tm) > 0) --- > /* Now wait INDEFINITELY on the set of sockets! */ > if (select(server + 1, &readfd, 0, 0, 0) > 0) 2046,2051d2042 < /* Clean up any forked children that have come back to die */ < { < int status; < pid_t dead_pid; < while((dead_pid = waitpid(0,&status,WNOHANG))>0); < } |
||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |