From: Michael Prokop <news@michael-prokop.at>
To: zsh-workers@sunsite.dk
Subject: Re: zsh history gets destroyed when running out of disk space
Date: Sat, 23 Jun 2007 00:40:09 +0200 [thread overview]
Message-ID: <2007-06-23T00-31-50@devnull.michael-prokop.at> (raw)
In-Reply-To: <20070622212825.a8d29679.p.w.stephenson@ntlworld.com>
[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]
* Peter Stephenson <p.w.stephenson@ntlworld.com> [20070622 22:31]:
> On Thu, 21 Jun 2007 10:04:54 +0200 Frank Terbeck <ft@bewatermyfriend.org> wrote:
> > Michael Prokop <news@michael-prokop.at>:
> > > Problem:
> > > Zsh truncates the zsh history file if you are running out of disk
> > > space (AKA ENOSPC). If you don't have any space left in your $HOME
> > > and exit zsh you'll find an empty $HISTFILE left.
> > Hey, I experienced just the same a few days back. So, I also think
> > this should be addressed.
> The following detects errors during writing better. If you're writing a
> new file it'll leave it wherever it gets to; if you're replacing an old
> file it will leave the old file alone. That's about the best we can do.
> I haven't tested this on a failure, but it should be better than what
> we've got.
Verified, works.
Exiting shell quits with:
| zsh: failed to write history file /home/grml/.zsh_history.new: unknown error 1182546552
and an empty /home/grml/.zsh_history.new file is left. My original
/home/grml/.zsh_history is left untouched (no truncating anymore).
During a shell session the history file is getting longer only as
long as there a free bits left (as you intented to). The error code
might be improved though. ;)
regards,
-mika-
--
,'"`. http://www.michael-prokop.at/
( grml.org -» Linux Live-CD for texttool-users and sysadmins
`._,' http://www.grml.org/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-06-22 22:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 20:22 Michael Prokop
2007-06-21 8:04 ` Frank Terbeck
2007-06-22 20:28 ` Peter Stephenson
2007-06-22 22:40 ` Michael Prokop [this message]
2007-06-23 18:09 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2007-06-23T00-31-50@devnull.michael-prokop.at \
--to=news@michael-prokop.at \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).