http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30162



--- Comment #51 from Janne Blomqvist <jb at gcc dot gnu.org> 2013-02-19 
22:48:50 UTC ---

(In reply to comment #22)

> Revision 180701 removed all checks for special files in 
> unit.c:unit_truncate().

> As a consequence programs compiled with gfortran 4.6.3 and newer cannot to

> write (formatted) to Unix named pipes as ftruncate() fails with EINVAL:

> 

> (64-bit code)

> 

> lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)

> write(3, " Hello, world!\n", 15)        = 15

> lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)

> ftruncate(3, 18446744073709551615)      = -1 EINVAL (Invalid argument)

> 

> (32-bit code)

> 

> _llseek(3, 0, 0xffba8fa0, SEEK_CUR)     = -1 ESPIPE (Illegal seek)

> write(3, " Hello, world!\n", 15)        = 15

> _llseek(3, 0, 0xffba9080, SEEK_CUR)     = -1 ESPIPE (Illegal seek)

> ftruncate64(3, 18446744073709551615)    = -1 EINVAL (Invalid argument)



This bug (http://stackoverflow.com/questions/11780556/write-to-fifo-named-pipe

, presumably) should be fixed by the patch at



http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00923.html

Reply via email to