New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
potential race condition when mixing signals and select() #11458
Comments
From pc88mxer@gmail.comFrom this discussion on perlmonks: http://perlmonks.com/?node_id=908535 it seems there is a race condition when mixing signals and select(). A solution is to use pselect() instead of select() when available. Perl Info
|
From @LeontOn Thu Jun 23 12:27:39 2011, pc88mxer@gmail.com wrote:
This is *not* a perl bug. but a fundamental difficulty in dealing with Leon |
The RT System itself - Status changed from 'new' to 'open' |
@cpansprout - Status changed from 'open' to 'rejected' |
From @ikegamiOn Sun, Dec 11, 2011 at 2:55 PM, Leon Timmermans via RT <
It's not "fundamentally difficult". It's been solved
|
From @ikegamiDisregard the previous message from me. It was sent accidentally far before On Sun, Dec 11, 2011 at 5:03 PM, Eric Brine <ikegami@adaelis.com> wrote:
|
From @cpansproutOn Sun Dec 11 14:05:26 2011, ikegami@adaelis.com wrote:
Forgive me, but I find it quite funny. :-) It sounds like something I
-- Father Chrysostomos |
From @ikegamiOn Sun, Dec 11, 2011 at 2:55 PM, Leon Timmermans via RT <
Perl signal handling uses an approach that suffers from a race condition. As for being a "fundamentally difficulty", just because race conditons can - Eric |
@cpansprout - Status changed from 'rejected' to 'open' |
From @LeontOn Sun, Dec 11, 2011 at 11:11 PM, Eric Brine <ikegami@adaelis.com> wrote:
That's no news. Are you suggestion a solution?
Life is much easier when you know exactly what the user wants, but
Even if it was portable, it's not going to solve the problem by itself. Leon |
From @LeontOn Mon, Dec 12, 2011 at 4:03 AM, Leon Timmermans <fawaka@gmail.com> wrote:
Thinking about it a little more, I think we can prevent the race Leon |
From pc88mxer@gmail.comOn Sun, Dec 11, 2011 at 1:55 PM, Leon Timmermans via RT
I think the suggestion is that perl should use pselect(2) instead of Alternatively perl could add support for pselect and keep the current Comments? |
From @LeontOn Wed, Jan 11, 2012 at 11:22 PM, E R <pc88mxer@gmail.com> wrote:
This bug report suffers from the problem that it doesn't describe *at What I suspect they mean here is that there is a race condition This does leave open the possibility of users making the same mistake Leon |
From @leonerdOn Sun, Dec 11, 2011 at 11:55:40AM -0800, Leon Timmermans via RT wrote:
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 -- leonerd@leonerd.org.uk |
From @nwc10On Thu, Jan 12, 2012 at 05:11:50PM +0100, Leon Timmermans wrote:
Agree.
As in ? I think that would "not be inconsistent" with the current expected behaviour I think it would be worth doing.
If the mistake (we're guessing at, given the vague nature of the "bug" Nicholas Clark |
From @LeontOn Fri, Jan 13, 2012 at 12:19 PM, Nicholas Clark <nick@ccl4.org> wrote:
Yes, though step 1 & 2 are really one atomic step, and some signals
Me too, though it would stop select from returning a meaningful
I agree. There are some solutions available CPAN, but the only Leon |
From @nwc10On Fri, Jan 13, 2012 at 05:27:09PM +0100, Leon Timmermans wrote:
Gah, and I suspect it's really hard, if not impossible, to probe for that.
Bother. No plan survives contact with the enemy. Nicholas Clark |
From @ikegamiOn Fri, Jan 13, 2012 at 11:38 AM, Nicholas Clark <nick@ccl4.org> wrote:
Really? Sounds like that could easily be emulated (when called in listay - Eric |
From @LeontOn Sun, Jan 15, 2012 at 8:28 AM, Eric Brine <ikegami@adaelis.com> wrote:
It can, but I'm not sure if it's really all that meaningful anymore Leon |
From @nwc10On Wed, Jan 18, 2012 at 01:58:48AM +0100, Leon Timmermans wrote:
I'm not sure either. But I don't think that it would be *that* expensive in the general case, as Nicholas Clark |
From @LeontOn Fri Jan 13 08:39:09 2012, nicholas wrote:
To the contrary, it seems quite easy. Set a signal-handler (without the Leon |
From @LeontOn Wed Jan 18 06:55:25 2012, nicholas wrote:
Problem is, $time_left is *before* running signal handlers, while we can Leon |
From @nwc10On Sun, May 27, 2012 at 03:34:02PM -0700, Leon Timmermans via RT wrote:
Nice trick. Who is writing the demo code? :-) Nicholas Clark |
From @LeontOn Fri, Jun 1, 2012 at 12:00 PM, Nicholas Clark <nick@ccl4.org> wrote:
The trick is from POSIX::pselect's test suite and it seems to be Leon |
Migrated from rt.perl.org#93428 (status was 'open')
Searchable as RT93428$
The text was updated successfully, but these errors were encountered: