From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16884 invoked by alias); 22 Dec 2015 18:14:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37420 Received: (qmail 9153 invoked from network); 22 Dec 2015 18:14:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Date: Tue, 22 Dec 2015 10:14:20 -0800 From: frederik@ofb.net To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: question about saving history and error reporting Message-ID: <20151222181420.GA21368@ofb.net> Reply-To: frederik@ofb.net References: <1450718785.14170.ezmlm@zsh.org> <20151221203800.GB23389@ofb.net> <151221125450.ZM21081@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151221125450.ZM21081@torch.brasslantern.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: 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