ofstream, fsync and data loss bugs

Paolo Carlini paolo.carlini@oracle.com
Wed Mar 17 23:45:00 GMT 2010


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.



More information about the Libstdc++ mailing list