Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 19 Sep 2005 22:53:05 +0200 | From | Edgar Toernig <> | Subject | Re: 2.6.14-rc1 wait()/SIG_CHILD bevahiour |
| |
Badari Pulavarty wrote: > > I am looking at a problem where the parent process doesn't seem > to cleanup the exited children (with a webserver). We narrowed it > down to a simple testcase. Seems more like a lost SIG_CHILD.
You are aware that the defunct processes are all grandchildren and the sigchild handler of the children is the one inherited from the main process? That sighandler is pretty bogus for the children, i.e. pid_exited never does anything useful. Further, the children terminate unconditionally after some time - all still present grand- children are inherited by init (pid 1) who does the clean up.
But I think the major problem is that the main-loop of the children and the signal handler both call usleep(rand()) - I wouldn't be surprised if this combo isn't reentrant, especially from signal handlers ...
Ciao, ET. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |