Summary: | wrong signal delivery to multithreaded processes in Perl | ||
---|---|---|---|
Product: | Base System | Reporter: | Thomas Eckardt <Thomas.Eckardt> |
Component: | threads | Assignee: | freebsd-threads (Nobody) <threads> |
Status: | Closed Works As Intended | ||
Severity: | Affects Only Me | CC: | emaste, kib |
Priority: | Normal | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
Thomas Eckardt
2013-11-19 07:40:00 UTC
There is no guarantee in POSIX that the main thread receives a signal sent to the process if multiple threads (including the main thread) have the signal unblocked. The only way to guarantee signal delivery to a specific thread is to send it directly to the desired thread, have all threads other than the desired thread mask the signal, or be blocked in sigwait{info}() from the desired thread at the time of signal delivery. You are relying on behavior that is not specified by the standard. |