A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-March/087126.html below:

[Python-Dev] Ext4 data loss

[Python-Dev] Ext4 data loss [Python-Dev] Ext4 data loss"Martin v. Löwis" martin at v.loewis.de
Thu Mar 12 20:15:15 CET 2009
> Something that doesn't require deterministicly named tempfiles was Ted
> T'so's explanation linked to earlier.
> 
> read data from important file
> modify data
> create tempfile
> write data to tempfile
> *sync tempfile to disk*
> mv tempfile to filename of important file
> 
> The sync is necessary to ensure that the data is written to the disk
> before the old file overwrites the new filename.

You still wouldn't use the tempfile module in that case. Instead, you
would create a regular file, with the name base on the name of the
important file.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4