[maemo-developers] Continuous reboot problem with the N770 hacker edition

From: Markku Vire markku.vire at movial.fi
Date: Fri Apr 27 11:05:15 EEST 2007
Hi,

There is a convenient way to achieve this "write temporary and rename" 
behaviour, at least for small configuration files: g_file_set_contents 
does this for you! Yeah, I know that it's blocking operation and don't 
use GnomeVFS (so, no notifications in maemo env), but I think that's 
good for this case Eero mentioned. Anyways, it doesn't cause extra work 
for developers.

-Markku-

Eero Tamminen wrote:
> Hi,
> 
> ext Frantisek Dufka wrote:
> 
...clip...
>>
>>>Some individual files
>>>could get only partially written, but all applications should
>>>be doing such writes safely (write to temp file and rename once
>>>writing is finished).
>>
>>This is the problem. It is not common at all to write to files in such
>>way. In case you want to apppend some data to existing file it is not
>>optimal to create new temporary file, copy all data and add few bytes.
>>You seriously can't expect people writing code in such way.
> 
> 
> For logs etc. you can of course append, I meant files which application
> loads when it starts and where it matters what their contents are.

More information about the maemo-developers mailing list