On Mon, Apr 19, 2010 at 7:02 PM, Maik Hentsche <maik@mm-double.de> wrote: > Hi, > I was recently confused by the way signal handlers using wait() behave > in collaboration with qx() or system(). > > When you have a signal handler for SIGCHLD that calls wait() and use > qx() or system() in your parent, the signal handler will be called. > Yet, because qx/system already wait()ed for their child the wait in the > signal handler would block. I doubt everyone will understand this in > the first place. Thus, I wrote an improvement for the documentation to > tell people about this issue. Please find the patch attached. It > applies to the current git HEAD. > Mentioning a problem is a good start, but what I'm missing is how to deal with this. That is far more valuable (and probably more complicated to do in a portable manner). Also, adding it three times may be an overkill. Personally don't think adding it to the system() documentation too adds much. You shouldn't be thinking about this when using system(), you should when using wait() IMO. LeonThread Previous | Thread Next