Does pthread emit a sigchld signal on successful exit?

C

chuckles

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 ;)
 
K

Keith Thompson

chuckles said:
Hullo all, as the subject says Does pthread emit a sigchld signal on
successful exit?
[...]

We don't know. Threads are not part of standard C.

Try comp.programming.threads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top