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
Dup DATA filehandle, lose initial data #7489
Comments
From jimc@math.ucla.eduThis is a bug report for perl from jimc@math.ucla.edu, #!/usr/bin/perl Flags: This perlbug was built using Perl v5.8.3 - Sat Apr 3 00:50:30 UTC 2004 Site configuration information for perl v5.8.3: Configured by abuild at Sat Apr 3 00:37:21 UTC 2004. Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Locally applied patches: @INC for perl v5.8.3: Environment for perl v5.8.3: |
From nick@ing-simmons.netJim Carter <perl5-porters@perl.org> writes:
Can you try this with Note that a dup'ed file handle shares the file pointer.
|
The RT System itself - Status changed from 'new' to 'open' |
From jimc@math.ucla.eduOn Mon, 6 Sep 2004, Nick Ing-Simmons via RT wrote:
Yes, it fails equally with perlio and stdio. Do I _need_ to do a dup? My original motivation was to use standard I kind of figured that when a stream was duped, the remainder of the Your point is well taken that both instances share the same file pointer, James F. Carter Voice 310 825 2897 FAX 310 206 6673 |
From nick@ing-simmons.netJim Carter <jimc@math.ucla.edu> writes:
Good - principle of least surprise seems to be working for our perlio
It does not work like that (as you have discovered). Pre-stuffing
We could probably pre-stuff buffers most places (at least with :perlio),
Wouldn't work - two streams would try and use same buffer memory.
Most IO libraries are not C++ but C - so no such thing as a "copy constructor". As I say for :perlio we could make ->Dup() call pre-stuff the buffer.
|
From @jkeenanOn Thu Sep 16 02:18:01 2004, ni-s wrote:
This is another RT where the person who was responding to the OP's Is there anyone who could review the issues raised in this ticket and Thank you very much. |
Migrated from rt.perl.org#31455 (status was 'open')
Searchable as RT31455$
The text was updated successfully, but these errors were encountered: