Subj : Re: Linux - waitpid portability To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Fri Feb 04 2005 08:50 am sreenidishc@gmail.com writes: > 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. My 'man waitpid' on Linux says: LINUX NOTES In the Linux kernel, a kernel-scheduled thread is not a distinct con- struct from a process. Instead, a thread is simply a process that is created using the Linux-unique clone(2) system call; other routines such as the portable pthread_create(3) call are implemented using clone(2). Before Linux 2.4, a thread was just a special case of a process, and as a consequence one thread could not wait on the children of another thread, even when the latter belongs to the same thread group. However, POSIX prescribes such functionality, and since Linux 2.4 a thread can, and by default will, wait on children of other threads in the same thread group. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .