Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
No fsync on history file? I lost my history
- X-seq: zsh-users 23670
- From: lilydjwg <lilydjwg@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: No fsync on history file? I lost my history
- Date: Sun, 23 Sep 2018 16:52:46 +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=Ut0qr0Dhar9pGk4Tflv3PgrAYdNftP7xfvO2a9G/N38=; b=iLVihaTVOyYrVpPYI0QBSEREqHn6usGZ6be7EyN2wbxXeSFqRnagKoP9LdvaSICGlv zvZO0bFJ4lW+QR2RzHhAgfQB2YnnrDy7dhpdXfOVh5nRQggdbSoKpr3mUOAWyh9nBYc2 PcsDwx5T60Dcy5COxQasz5x08fVYNJkmbin5OtmN7n36SRUVRPD0D51NDyKoW9KlFCw6 UV2wskoALsKn/kssjypXo/AUoK87OKVAtSlBchJKIzc1NOy7Tdzs46Gx3fKGywxwOBwR NnmV+Ez/JU5iWjGbfV7jObPDTt+4IuPDmTXwwQosBItY4CS1/S01ms2wJEA8TBht/BVm L0GA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
(Resending to zsh-users because my message to zsh-workers seemed to be
ignored.)
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.
--
Best regards,
lilydjwg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author