Signals are process-level constructs. This doesn't have anything to do with perl as such--it's the way POSIX threads are defined. Asynchronous signals act on the entire process, rather than on any individual thread. (Or should, for a POSIX conformant thread implementation)
Quite a few people would have preferred signals act on individual threads, but this has its own set of problems. Neither way is particularly great, and each sucks in its own unique fashion. The POSIX folks chose the whole process route. Just one of those things. | [reply] |
You may want to have a look at the Thread::Signal package on CPAN - This module is described as allowing signals to be delivered to specific "threads" on systems that employ separate (pseudo-)processes for each "thread". At this stage, this module only works under Linux on Perl 5.8.0 with thread support.
Not a true solution, but something interesting to consider ... :-)
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111101011")),"\n"' | [reply] |