in reply to yet another thread/signal question
why doesn't the signal fire in the thread
if it does fire, how do I get rid of the 'unjoined' message at the end?
The problem fact is that signals are per-process events. So, even though you've set up a signal handler in your thread, the main thread is being interrupted by the signal before your thread ever gets a chance to see it.
The signal interrupts the th->join call in your main thread and, as you don't have a signal handler there, the process is terminated. As the the thread un-joined at that point, you get the error message.
The bottom line is that using signals and threads doesn't work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: yet another thread/signal question
by markseger (Beadle) on Nov 06, 2011 at 16:23 UTC | |
|
Re^2: yet another thread/signal question
by onelesd (Pilgrim) on Nov 06, 2011 at 19:18 UTC | |
by BrowserUk (Patriarch) on Nov 06, 2011 at 19:22 UTC |