Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
No fsync on history file? I lost my history
- X-seq: zsh-workers 41401
- From: lilydjwg <lilydjwg@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: No fsync on history file? I lost my history
- Date: Wed, 5 Jul 2017 11:52:53 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=SI/Pm4ghCVw11hxThf/3TbbNnXddSrn7gBpsxGOEo2c=; b=OEhlkPQQ7RPjh0yvqPyDHG4YCws+RSKSp8EQqq7sc4fr6mKPLMaTvmOij71XsW4oFn K3e7y5sgWKfOvxt4Qv7PT87TPFEV/hfNPM+56SzOiY7UuM42R27now98+ooN2bzmUo04 xtVAYpkqTNsYe1/VP/kdR6cjIr1UqiBldLyVnH1f/LVc5OHJAX2A1Xv4bt3anAEURd8p Y+MBHYwbw7d42TLOpdUHdk7FZ5STNGIGRPQArN0M4ueDvebfPNLsQ74UCIYJY+VDU+R5 jQBPwB8xTxzukWfU7EmoMfT4CVd+XamT0ALttMq5uBsLiALATgkU/8OR8i9qYlhKR91Q 7LuA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author