[Bug fortran/47694] New: Fortran read from named pipe fails to read all available data
David.Duffy at qimr dot edu.au
gcc-bugzilla@gcc.gnu.org
Fri Feb 11 07:34:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47694
Summary: Fortran read from named pipe fails to read all
available data
Product: gcc
Version: fortran-dev
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: David.Duffy@qimr.edu.au
I am mucking around with named pipes and read().
program testpipe
integer :: ios, n
character (len=1024) :: lin
open(7, file='tmpfifo')
n=0
do
read(7,'(a)', iostat=ios) lin
if (ios /= 0) exit
n=n+1
write(*,*) n, trim(lin)
end do
end program testpipe
Using gfortran (4.6.0 20110209), this stops before reading all data in the pipe
unless it is further topped up from the other end ;) As written, no such
problem with sunf95, g95, openf95 (runs until pipe emptied, then waits for
more). I presume it is a buffering problem somewhere.
Linux tinonee 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686
GNU/Linux
Cheers, David Duffy.
More information about the Gcc-bugs
mailing list