in reply to Re: Yet another config file editing programme : Tell me how to make it better !
in thread Yet another config file editing programme : Tell me how to make it better !
There is a very small, but finite risk of the Pi being turned off in the middle of a file writeHa ha, I have long experience contemplating this annoying and tricky problem! The straightforward solution I concocted back in 2003 (and am still happy with) is to simply write a new file on the same file system ... and then use (atomic) rename to clobber the original file - but only after the new file has been successfully written. This is described in detail at:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Yet another config file editing programme : Tell me how to make it better !
by tybalt89 (Monsignor) on Sep 03, 2021 at 09:32 UTC | |
by eyepopslikeamosquito (Archbishop) on Sep 03, 2021 at 10:09 UTC | |
by dazz (Beadle) on Sep 04, 2021 at 04:12 UTC |