using (any) threaded perl (5.10 ... 5.18) and any freebsd version 8.x (or gt) the following happens: If a Perl script starts multiple threads (iThreads) - but at least one thread, all OS signals like 'kill -INT PID' are sent to the last started thread - NOT to the parent thread like expected. freebsd versions below version 8 are not tested Perl versions below 5.10 are not tested because of known Perl issue Fix: No workaround. The last started Perl child thread must send the received SIG to the parent thread. How ever, this makes it very hard to use signals for inter-thread communication and controlling How-To-Repeat: start multiple iThreads in Perl (interactive) - try to terminate or interrupt the script via keyboard or from another process using 'kill -SIG PID' - this will not work. I have a nice small perl script available to force/show the issue. Tell me if you need it.
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.