develooper Front page | perl.perl5.porters | Postings from December 2011

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

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
December 11, 2011 19:03
Subject:
Re: [perl #93428] potential race condition when mixing signals and select()
Message ID:
CAHhgV8j_rJ_0TyTZRuzDLNceZzXcwMAy8C=rMSFeqie6yB9rVw@mail.gmail.com
On Sun, Dec 11, 2011 at 11:11 PM, Eric Brine <ikegami@adaelis.com> wrote:
> Perl signal handling uses an approach that suffers from a race condition.
> It's buggy.

That's no news. Are you suggestion a solution?

> As for being a "fundamentally difficulty", just because race conditons can
> be tricky to avoid when using threads or signals doesn't mean we shouldn't
> fix them.

Life is much easier when you know exactly what the user wants, but
core can't make any assumptions, that is the problem. Core doesn't
know which signal should be blocked when, only the user does. There is
no magical solution, best we can do is doing exactly what the user
asks us to do, and assume he knows what he's doing.

> And it's neither tricky nor difficult to solve on systems with
> pselect.

Even if it was portable, it's not going to solve the problem by itself.

Leon

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