This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: ofstream, fsync and data loss bugs


On 03/18/2010 12:33 AM, Joe Buck wrote:
> Are you suggesting putting an fsync() in every close()? That
> would be hugely expensive.
>   
Yeah... Actually, reminds me when novice C++ programmer are advised
*against* using << std::endl; instead << '\n';

But I agree something seems lacking in the ISO C++ specifications about
making the file descriptor available, by now it's really a FAQ. At some
point I think somebody even tried to discuss it within the ISO LWG, but
then the idea got lost...

Paolo.


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