in reply to Re^2: Alarms with ActivePerl do not work properly (small modification)
in thread Alarms with ActivePerl do not work properly
Did I test it wrong,
No, your test is correct, though the interpretation may be a little off.
In this case, it isn't that the IO is causing the signal to be deferred. The alarm 'signal' is being simulated by a one-shot timer, which as the name applies happens once. If the code is not in an interuptable state when it does, the timer is effectively discarded.
That could be fixed by using an Overlapped-IO Read and entering an interuptable wait and cancelling the pending IO if the timer goes off.
Indeed, ubiquitous use of Overlapped IO would allow the whole select/signals emulation to be done in a far more POSIX-compliant fashion, but that would be a major re-write of the perl/win32 subsystems and I can't see anyone taking that task on.
|
|---|