This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/8504: ios::app + pipes


>Number:         8504
>Category:       libstdc++
>Synopsis:       ios::app + pipes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 08 06:26:10 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     papadopo@shfj.cea.REMOVE.fr
>Release:        gcc-3.2
>Organization:
>Environment:
Solaris 8 7/01 + gcc-3.2
IRIX 6.5.13 + gcc-3.0.2
>Description:
fstream::open() with ios::app flag fails on pipes for gcc 3.0 and better.

This used to work fine with gcc 2.95.3.
>How-To-Repeat:
To reproduce:
- build the attached openapp.cc source file
- create a pipe named /tmp/pipe - use "mkfifo /tmp/pipe"
- run the program, it will attempt to open /tmp/pipe with
  fstream::open() and ios::app flag
- read the pipe from a shell to unblock - "cat /tmp/pipe"
- fstream::open() will fail with error "Illegal seek"
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="openapp.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="openapp.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnN0cmVhbT4KI2luY2x1ZGUgPGNzdHJpbmc+
CiNpbmNsdWRlIDxjZXJybm8+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAg
b2ZzdHJlYW0gcGlwZTsKICBwaXBlLm9wZW4oICIvdG1wL3BpcGUiLCBpb3M6Om91dHxpb3M6OmFw
cCApOwogIGlmKCAhcGlwZSApCiAgICBjZXJyIDw8ICJjb3VsZCBub3Qgb3BlbiBwaXBlICgiIDw8
IGVycm5vIDw8ICIsICIgPDwgc3RyZXJyb3IoZXJybm8pIDw8ICIpIiA8PCBlbmRsOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]