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
IO on active pipes fails after ithread fork in 5.8.8 #9350
Comments
From johnh@isi.eduCreated by johnh@isi.eduIO on an active pipe fails after a thread fork, cat pipe_input.in | ./pipe_test.pl behave DIFFERENTLY than ./pipe_test.pl < cat_input.in This result appears to be because perl tries to lseek to the current It seems to me (not having looked at perl's guts) that there is no This behavior is reproducable with the test case below. The problem only happens when the file is active (i.e., one line of input ---------------------------------------- # save as pipe_test.pl use IO::Handle; my $in = new IO::Handle; # comment out the next line and it works my $worker_thread = threads->new( sub { my $result = $worker_thread->join; print "\nline count: $result\n\n"; exit 0; sample input file (pipe_input.in): #h header ---------------------------------------- sample tail of the strace -f output: ... Perl Info
|
From johnh@isi.eduThe test case I posted for perl-5.8.8 produces the same results on -John Heidemann |
From @jkeenanOn Tue May 27 10:52:24 2008, johnh@isi.edu wrote:
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
Could someone familiar with threads try this out on Perl 5.18 and make Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Sun May 26 09:51:31 2013, jkeenan wrote:
Script as posted above Count will incorrectly be 0 if run with cat pipe_input.in | perl C:\Documents and Settings\Owner\Desktop>type pipe_input.in | perl line count: 0 Count will incorrectly be 0 if run with cat pipe_input.in | perl C:\Documents and Settings\Owner\Desktop> Below is with "my($header) = $in->getline;" commented out. Count will incorrectly be 0 if run with cat pipe_input.in | perl C:\Documents and Settings\Owner\Desktop>type pipe_input.in | perl Count will incorrectly be 0 if run with cat pipe_input.in | perl C:\Documents and Settings\Owner\Desktop> tested with "Summary of my perl5 (revision 5 version 19 subversion 0)" -- |
Migrated from rt.perl.org#54926 (status was 'open')
Searchable as RT54926$
The text was updated successfully, but these errors were encountered: