Re: [UnixOS2] waitpid : why does this not work?
Andreas Buening <[email protected]> Fri, 19 Sep 2003 01:36:56 +0200
| Newsgroups | gmane.comp.ide.emx.devel |
|---|---|
| Message-ID | <[email protected]> |
Thomas Hoffmann wrote: I'm not an expert in signals but, since you've got that many responses, I'll try to answer your questions. ;-) > I did not find too many discussion about waitpid() on older OS/2+emx > archives, so I will ask this here: > > According to some sample code e.g. in the glibc documentation something > like this should collect all the children of a process in a signal > handler for SIGCLD/SIGCHLD: [code] > But it does not work at all for me: an infinite loop starts as soon as > this handler is entered. [snip] SIGCHLD is different on OS/2. This means you'd better forget about what you've read in any Unix docs. If you use -Zsys, you don't have SIGCHLD. If you uncritically compile Unix programs that use a SIGCHLD handler, there is a good chance that your program will produce a deadlock. However, I don't know why your code doesn't work. Bye, Andreas