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!
Chuckles ;)