开发者

Are calls to signal() done across all threads?

开发者 https://www.devze.com 2022-12-21 22:54 出处:网络
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?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号