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

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

Thread Next
From:
bulk 88 via RT
Date:
September 18, 2012 01:29
Subject:
[perl #33096] [PATCH] win32_msgwait runs forever with non-infinite timeout
Message ID:
rt-3.6.HEAD-11172-1347956965-251.33096-15-0@perl.org
> 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
time"
1347955780
1347955790

C:\p517\perl>r
__________________________________

I also attached the new patch to this post.

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=33096

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About