in reply to Re^4: I know that signal handling isn't working well on win32, but how bad is it?
in thread I know that signal handling isn't working well on win32, but how bad is it?
In practice, you can't really do much in an signal handler due to thread-safety issues. You end up needing an event dispatch loop to handle signals.
For example, the only thing Perl ever does* in response to a signal is to set a flag. The signal is later handled by Perl's event dispatch loop.
Even then, you end up library calls returning spuriously errors due to being interrupted, etc.
* — Since 5.8.1, unless you disable safe signals.
|
|---|