* No fsync on history file? I lost my history
@ 2017-07-05 3:52 lilydjwg
0 siblings, 0 replies; only message in thread
From: lilydjwg @ 2017-07-05 3:52 UTC (permalink / raw)
To: zsh-workers
Hi there!
I just experienced a kernel oops. When I was back after a hard reset,
I lost my entire zsh history: the file was truncated to zero bytes.
I noticed zsh writes to a temporary file first, then renames, but
doesn't call fsync after finishing writing. I talked with my friend
knowing a lot about filesystems and I think a fsync will prevent this
kind of thing (or it'll be a kernel bug).
What do you think? Would you add the fsync call or make an option for
that? I recovered from a backup but it was not great experience.
Please cc me because I'm not subscribed.
--
Best regards,
lilydjwg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-05 3:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05 3:52 No fsync on history file? I lost my history lilydjwg
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).