Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Whats the difference of signal handling for process and thread?

0
Posted

Whats the difference of signal handling for process and thread?

0

What’s the difference of signal handling for process and thread? Do the signals divided into the types of process-based and thread-based which were treated differently in HP-RT? Is there any examples? I’d like to know how to initiate, mask, block, wait, catch, …… the signals. How can I set the notification list (process or thread?) of SIGIO for both socket and tty using fcntl or ioctl? A: You probably want to buy one of the books that discuss this in detail. Here’s the short answer: Signal masking is on per-thread based. But the signal handlers are per-process based. The synchronous signals like SIGSEGV, SIGILL etc will be processed by the thread which caused the signal. The other signals will be handled by any ready thread which has the mask enabled for the signal. There are no special thread library for signal handling.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123