Subj : Does pthread emit a sigchld signal on successful exit? To : comp.programming.threads From : chuckles Date : Thu Aug 18 2005 03:37 pm Hullo all, as the subject says Does pthread emit a sigchld signal on successful exit? 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. The time it takes for the thread to complete is variable and I don't want to have to poll the thread for completion. 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. When I run the app in gdb, thread exit messages are printed when ever a thread exits. How does gdb do it? Can anyone give me a definitive answer to this? It feels like pthread should be able to do this but I can't find any specific tutorial or reference which says it does or doesn't. Help! I'm programming in C++ on RH9 running 2.6.12, gcc3.2.2, I have a C++ object wrapped around a thread (a dirty hack but I needed to make the C++ and threads splice somehow), I want to avoid excessive coupling in the program so I don't want to pass the gui object to the C++ thread wrapper object. If anyone can give me a clue as to what the problemo is that's be great. Sorry if this seems like an obvious question, its been driving me mad. Chuckles ;) .