Does pthread emit a sigchld signal on successful exit?

Discussion in 'C Programming' started by chuckles, Aug 18, 2005.

  1. chuckles

    chuckles Guest

    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 ;)
    chuckles, Aug 18, 2005
    #1
    1. Advertising

  2. "chuckles" <> writes:
    > 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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Aug 18, 2005
    #2
    1. Advertising

  3. chuckles

    chuckles Guest

    Sorry All. My mistake.
    chuckles, Aug 18, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. walala
    Replies:
    4
    Views:
    2,096
    Ralf Hildebrandt
    Sep 8, 2003
  2. Harlin Seritt

    Sys.exit() does not fully exit

    Harlin Seritt, Feb 17, 2008, in forum: Python
    Replies:
    3
    Views:
    278
    Christian Heimes
    Feb 17, 2008
  3. Dan Stromberg

    Re: Missing SIGCHLD

    Dan Stromberg, Feb 15, 2011, in forum: Python
    Replies:
    1
    Views:
    996
    Adam Skutt
    Feb 16, 2011
  4. Asfand Yar Qazi

    SIGCHLD handler not working correctly

    Asfand Yar Qazi, Dec 15, 2007, in forum: Ruby
    Replies:
    1
    Views:
    131
    Lionel Bouton
    Dec 15, 2007
  5. Moritz Karbach

    ignoring SIGCHLD

    Moritz Karbach, Jun 23, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    416
    Anno Siegel
    Jun 23, 2005
Loading...

Share This Page