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

Re: [perl #93428] potential race condition when mixing signals andselect()

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
January 12, 2012 10:13
Subject:
Re: [perl #93428] potential race condition when mixing signals andselect()
Message ID:
20120112181308.GF31838@cel.leo
On Sun, Dec 11, 2011 at 11:55:40AM -0800, Leon Timmermans via RT wrote:
> > it seems there is a race condition when mixing signals and select().
> > 
> > A solution is to use pselect() instead of select() when available.
> 
> This is *not* a perl bug. but a fundamental difficulty in dealing with
> signals. I suggest closing this ticket.

I agree. It's a well-known limitation in the API design of select(2).

pselect(2) and ppoll(2) work around it. E.g. note my own IO::Ppoll, an
IO::Poll-compatible dropin replacement that uses ppoll(2).

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Thread Previous | 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