Subj : Re: Does pthread emit a sigchld signal on successful exit? To : comp.programming.threads From : David Schwartz Date : Thu Aug 18 2005 04:39 pm "chuckles" wrote in message news:1124401034.086073.309590@g44g2000cwa.googlegroups.com... > Hullo all, as the subject says Does pthread emit a sigchld signal on > successful exit? No. > I have an app which starts a thread in response to a button press in a > GUI. I can't join the thread but I need to know when it completes. So code it to tell you. Worst case, write your own thread startup function that calls pthread_clean_push and then calls the normal startup function. > The > time it takes for the thread to complete is variable and I don't want > to have to poll the thread for completion. Why not? If the thread is not detached and it's your job to join the thread when it's done, you can call pthread_kill at any time to see if it's done. > I would like to avoid having > to use condition variables, so I thought setting up a signal handler to > catch the SIGCHLD signal would be a neat solution, I've tried using > signal() and sigaction to associate my handler with the SIGCHLD signal > but the handler is never called. Of course not. A thread is not a child. DS .