zsh-workers
 help / color / mirror / code / Atom feed
From: frederik@ofb.net
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: question about saving history and error reporting
Date: Tue, 22 Dec 2015 10:14:20 -0800	[thread overview]
Message-ID: <20151222181420.GA21368@ofb.net> (raw)
In-Reply-To: <151221125450.ZM21081@torch.brasslantern.com>

On Mon, Dec 21, 2015 at 12:54:50PM -0800, Bart Schaefer wrote:
> On Dec 21, 12:38pm, frederik@ofb.net wrote:
> }
> } My disk filled up recently and I noticed that although Zsh was not
> } able to write to the history file, it did not print any error
> } messages.
> 
> Incremental appends do not generate error messages (cf. hist.c:1105
> where the second argument to savehistfile() is zero).
> 
> This is because (a) it would mean up to two error messages per command
> executed, which could make normal use of the shell difficult/annoying,
> and (b) it's assumed there will be another attempt later, either on the
> next command or at shell exit, so there's no reason to report transient
> error conditions.
> 
> Most likely you are not seeing the error that is generated at shell exit
> because your terminal window has already closed.
> 
> It's possible that we could examine errno and decide to issue the error
> anyway in potentially critical situations.
> 

Thank you for the reply. But don't most people use terminal windows,
or screen, or some other tool which hides whatever output zsh produces
on exit?

For me, if the history can't be written, it would be convenient to
know about the errors that are being generated immediately, so that I
can fix the problem. Are there many situations where the history can't
be written due to a problem which is transient? Are there other cases
where Zsh hides errors that occur during its operation?

Well, perhaps I can just patch hist.c locally...

Thanks,

Frederick


  reply	other threads:[~2015-12-22 18:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1450718785.14170.ezmlm@zsh.org>
2015-12-21 20:38 ` frederik
2015-12-21 20:54   ` Bart Schaefer
2015-12-22 18:14     ` frederik [this message]
2015-12-23  0:54       ` Bart Schaefer
2015-12-24  0:47         ` frederik

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=20151222181420.GA21368@ofb.net \
    --to=frederik@ofb.net \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).