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
Serious bug of tell() in perl 5.8 #6102
Comments
From tung@turtle.ee.ncku.edu.twCreated by tung@turtle.ee.ncku.edu.twThere is a serious bug in tell() in perl 5.8 on RedHat 8.0. If a file is opened with '>>', If some data is written after the above open(), Here is a short example open(F, ">>somefile"); # somefile is a file with some text in it $a=tell(F); # return 0 print F "end"; # the str will be appended at tail correctly close(F); Perl Info
|
From @andk
> # New Ticket Created by "Chung-Kie Tung" > This is a bug report for perl from tung@turtle.ee.ncku.edu.tw, > ----------------------------------------------------------------- > There is a serious bug in tell() in perl 5.8 on RedHat 8.0. > If a file is opened with '>>', > If some data is written after the above open(), > Here is a short example > open(F, ">>somefile"); # somefile is a file with some text in it > $a=tell(F); # return 0 > print F "end"; # the str will be appended at tail correctly > close(F); I cannot reproduce this error. I'm running a RedHat 6.2 system that Can anybody else with or without RedHat 8.0 reproduce the bug? I have tried the script as written above and a modified script that system("echo foo > somefile"); with hundreds of different perls between 5.6.0 and bleadperl. No -- |
From guest@guest.guest.xxxxxxxx
I reproduce this error! Windows 2000 Advanced server. I try test on 3 perl version, and results differents: 1) perl5 (5.0 patchlevel 5 subversion 03) (from Oracle 8.1.7 D:\temp>W:\oracle\ora9\Apache\perl\5.00503\bin\MSWin32-x86\perl.exe -w D:\temp>W:\oracle\ora9\Apache\perl\5.00503\bin\MSWin32-x86\perl.exe -w 2) perl5 (revision 5 version 6 subversion 1) ActivePerl Build 633 D:\temp>c:\perl.633\bin\perl -w a.pl D:\temp>c:\perl.633\bin\perl -w a.pl 3) perl5 (revision 5 version 8 subversion 0) D:\temp>c:\perl\bin\perl.exe a.pl D:\temp>c:\perl\bin\perl.exe a.pl After last operation ( run c:\perl\bin\perl.exe a.pl) length |
From tokar@tokar.ruopenwebmail installer openwebmail-tool.pl WARNING! The perl on your system has serious bug in routine tell()! We suggest that you should patch your perl as soon as possible. |
nick@ing-simmons.net - Status changed from 'new' to 'open' |
From nick@ing-simmons.netI dispute that it is "serious" as usually the whole point of opening for I note (by experiment) that Linux stdio does not handle read/append open(FOO,"+>>somefile"); man pages don't say it cannot be done - so it should work. If reading does not work, and you have no control over write position However, because :perlio (which is what shows the bug) is supposed I have chosen (B) as it is "safer" - i.e. window of race condition With the fix code like above which does "+>>somefile" behaves Fixed by //depot/perlio/perlio.c@18471 |
nick@ing-simmons.net - Status changed from 'open' to 'resolved' |
From pjsm@fct.unl.pt[ni-s - Sun Jan 12 10:51:10 2003]:
Indeed tell() works on Linux if you _explicitly_ open the file with open (FOO,"+>>:unix","somefile"); and after the first write operation. Is the correct (or expected) |
Migrated from rt.perl.org#18711 (status was 'resolved')
Searchable as RT18711$
The text was updated successfully, but these errors were encountered: