These are all zombies. IE, they're waiting for their parent to pick
them up, and the process will stay around until the parent waits for
them. So, try:
-> #include <signal.h>
#include <sys/types.h>
-> #include <sys/wait.h>
-> main(){
int status;
-> for(;;) {
-> if( !fork() ) {
-> exit(0); /* child, exit immediately */
-> }
wait(&status);
-> sleep(1);
-> }
-> }
The additions should cause the children to exit before the sleep.
Please take any further replies/questions off the linux-kernel list,
as this isn't an appropriate topic.
-Larry