tags:

views:

52

answers:

1

Are calls to signal() done across all threads in a process? Or do you have to call signal for each signal you want to catch per thread?

Thanks, Chenz

+3  A: 

According to this link on "Requirements of the POSIX signal model",

The basic concept behind the POSIX signal model is that

signal handlers are a process resources; and

signal masks are a thread resources

In other words, there can only be a single signal handler (for a particular signal) defined for the process, but you must set the signal mask in every thread.

David Gelhar