Subj : Linux - waitpid portability To : comp.programming.threads From : sreenidishc Date : Thu Feb 03 2005 10:00 pm I am working on a multithreaded application, which has five constituent processes. The first process forks the other processes as and when required. There could be multiple child processes of same type at any given time. All the child processes are monitored by the main process. The main process consists of five threads. Any of the four threads could fork the child processes. Only the fifth thread monitors the child processes using waitpid(). I ported this application on Solaris, Aix and HP UX. But On Linux, this design is not working because, it considers each thread as a distinct process. So the waitpid() called from the fifth thread could not reap the process status. I searched for a solution, and understand that in Linux, the thread which fork()ed the process must reap the process status using waitpid(). This means a major change in the design. Could anybody suggest a way to monitor processes created by other threads in Linux, in a multithreaded application described above? Any hint/links to solution would be of great help to me. Thanks. Sreenidish C .