develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #33096] [PATCH] win32_msgwait runs forever with non-infinite timeout

Thread Next
bulk 88 via RT
September 18, 2012 01:29
[perl #33096] [PATCH] win32_msgwait runs forever with non-infinite timeout
Message ID:
> Sorry, haven't found time yet to read this thread, but alarm() emulation
> on Windows is supposed to interrupt sleep().  A quick check confirms that
> it still works:
> C:\>perl -E"$SIG{ALRM}=sub{die};say time;alarm 2;eval{sleep 10};say time"
> 1347909521
> 1347909523
> sleep() is also emulated, so doesn't count as a "blocking system call".
> Maybe this should be documented in perlport.pod.
> Cheers,
> -Jant
But sleep was interrupted by the signal, the sleep when *poof* with the
longjmp/die. The was only possible with eval and die, if you remove them
and want Perl sleep to return early posix style on win32 it wont work.

C:\p517\perl>perl  -E "$SIG{ALRM}=sub{0;};say time;alarm 2;sleep 10;say


I also attached the new patch to this post.

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About