I'm trying to implement a signal handler.
each pthread is created joinable, and is blocked upon all signals using sigprocmask.
The problem occurs when I send the thread a signal from another thread, using
pthread_kill(_threads[threadIndex], SIGHALT);
If the called pthread is waiting on pthread_join at the time the signal is sent, the whole proccess is terminated immidiately. However, if the thread is not waiting on join, it ignores the signal as expected. Any idea why does it happen and how to change it?
Thank you!
No comments:
Post a Comment