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

[perl #93428] potential race condition when mixing signals and select()

Thread Next
From:
Leon Timmermans via RT
Date:
May 27, 2012 20:17
Subject:
[perl #93428] potential race condition when mixing signals and select()
Message ID:
rt-3.6.HEAD-5009-1338158115-1315.93428-15-0@perl.org
On Wed Jan 18 06:55:25 2012, nicholas wrote:
> I'm not sure either.
> 
> But I don't think that it would be *that* expensive in the general
case, as
> we'd only need to do the work when select is in list context.
> Also, we could decide that we're only going to do emulation if both
> (a real) pselect and gettimeofday are present, to simplify the code.

Problem is, $time_left is *before* running signal handlers, while we can
only measure it *after*. Any emulation would have a hole, that can
actually be bigger than $timeout.

Leon

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

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