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:49 AM, Pavel Sanda wrote:
>> Are you suggesting putting an fsync() in every close()?
>>     
> I'm rather mapping out the terrain for something like
>
> ofstream ofs(filename, ios::out|ios::trunc|ios::fsync);
>   
Is there *any* existing practice about this issue? Before attempting
something, even as a GCC extension - which would be unportable anyway
until standardized, that is no better than ext/stdio_filebuf - we should
investigate whether other implementations are *somehow* trying to do
something about it.

Paolo.


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