https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127424
--- Comment #3 from Gökbey Keskin <gokbeykeskin at gmail dot com> --- (In reply to Jonathan Wakely from comment #1) > (In reply to Gökbey Keskin from comment #0) > > r0-56237-g6a734d618f8 (2004-02-04, "Correct flags to filebuf::open calls", > > the commit that introduced fopen_mode) changed both the mode and the > > expectation: > > > > - filebuf* ret = fb.open(name, ios_base::out | ios_base::trunc); > > + filebuf* ret = fb.open(name, ios_base::in | ios_base::out); > > For completeness, should we restore the ios_base::trunc as well? Your patch > doesn't do that. > > Apart from that, this looks good, thanks. O_TRUNC shall have no effect on FIFO special files or terminal device files according to POSIX standard.
