-
Notifications
You must be signed in to change notification settings - Fork 577
Reading from STDIN fails if SIGCHLD handler is set #12753
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
Comments
From [email protected]This is a bug report for perl from dmitry.panov@yahoo.co.uk, Hi, After upgrading from Debian Squeeze to Ubuntu 12.04 I noticed that one of the perl scripts was failing. error: Illegal seek at ./2.pl line 11, <STDIN> line 16. It looks like the text of the error is irrelevant, it's just the latest error. For the script it looks I'm actually not sure whether it's a perl or a libc bug because I was able to reproduce it on Debian So it looks like glibc 2.11 is fine, but 2.13+ is not. If I change the SIGCHLD handler to 'INGORE' it works fine in all cases. File listings below: 1.pl: #!/usr/bin/perl use Time::HiRes qw( usleep ); open my $f, "| ./2.pl"; my $s = "1\n1\n1\n1\n"; while (1) { 2.pl: #!/usr/bin/perl use POSIX qw/:sys_wait_h /; use strict; sub _log { sub REAPER { sub main_stdin { while (1) { # main $SIG{CHLD} = \&REAPER; print $], "\n"; main_stdin(); Flags: Site configuration information for perl 5.14.2: Configured by Debian Project at Tue Nov 27 00:34:23 UTC 2012. Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Locally applied patches: @INC for perl 5.14.2: Environment for perl 5.14.2: |
From @iabynOn Sun, Feb 03, 2013 at 10:36:39AM -0800, dmitry.panov@yahoo.co.uk wrote:
I can reproduce it on perl 5.14.x but not 5.16.0 or later (both with I bisected, and it appears to have been fixed by this commit: commit be48bbe add a couple missing LEAVEs in perlio_async_run() Which made it into 5.15.4. The fact that you're still seeing this issue with 5.16 makes me wonder If you change this line in 1.pl: open my $f, "| ./2.pl"; to open my then explicitly run 1.pl with the correct perl version, e.g. perl5.16.0 ./1.pl do you still see the issue? -- |
The RT System itself - Status changed from 'new' to 'open' |
From [email protected]On 05/02/13 14:00, Dave Mitchell via RT wrote:
Hmm... I was fairly sure it was the correct version (that's why I have I also found the same bug (by googling the commit id) reported and fixed Anyway, thanks a lot for your help, I'm going to update the ubuntu bug I Best regards, -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#116621 (status was 'resolved')
Searchable as RT116621$
The text was updated successfully, but these errors were encountered: