zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@zsh.org
Subject: Re: precmd: write error: interrupted
Date: Thu, 25 Apr 2013 19:38:17 +0100	[thread overview]
Message-ID: <20130425193817.2f82b60c@pws-pc.ntlworld.com> (raw)
In-Reply-To: <130425111646.ZM17258@torch.brasslantern.com>

On Thu, 25 Apr 2013 11:16:46 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> } 1) SIGWINCH should either be masked or allow write to restart.
> 
> This requires some thought about the appropriate layer to handle this.
> bin_print does already do some signal queuing when writing to internal
> data structures (print -z, print -s), but that's deliberately isolated
> to bin_print, whereas all sorts of other things might write to the
> terminal -- including other error messages! -- so patching bin_print is
> not covering all the bases.

Certainly true, but I'm hesitant to do nothing except declare it's
difficult...  Explicit user output via print and error messages via
zsh's own error and warning functions are two cases that cover quite a
lot.  If there's already signal queuing in print, is it up to snuff?  Is
there ever a good reason for allowing a single print to be interrupted
at the point of output --- surely it's always going to do unhelpful
things?

I don't think we'd want to queue interrupts round all builtins, but could
we mark those that produce output but otherwise return immediately with
a flag in the builtin table and do some queueing in the builtin handler?
 
> On the other hand we probably don't want to build a wrapper around the
> entire stdio library just to differentiate terminal writes.

It certainly doesn't sound feasible to do much at the stdio level.
If we were just talking about write() it might feasible to use a simple
wrapper in key places, but it sounds like it can't be reduced to that.

pws


  reply	other threads:[~2013-04-25 18:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 16:47 Yuri D'Elia
2013-04-25 17:44 ` Yuri D'Elia
2013-04-25 18:27   ` Bart Schaefer
2013-04-25 18:16 ` Bart Schaefer
2013-04-25 18:38   ` Peter Stephenson [this message]
2013-04-25 22:18     ` Bart Schaefer
2013-04-26  0:52       ` Bart Schaefer
2013-04-25 19:38   ` Yuri D'Elia
2013-04-26  0:53     ` Bart Schaefer
2013-04-25 20:05   ` Yuri D'Elia
2013-04-25 20:58     ` Yuri D'Elia
2013-04-26 15:08     ` Bart Schaefer
     [not found]     ` <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com>
2013-04-26 17:59       ` Yuri D'Elia

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=20130425193817.2f82b60c@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-users@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).