zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: precmd: write error: interrupted
Date: Fri, 26 Apr 2013 09:42:48 +0100	[thread overview]
Message-ID: <20130426094248.42674faa@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <130425151839.ZM17476@torch.brasslantern.com>

On Thu, 25 Apr 2013 15:18:39 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Consider something like:
> 
>     x=({1..1000000}
>     print $x
> 
> If you can't ^C that print, you're potentially in a world of pain.  (It's
> already enough of a problem that you can't ^C the assignment itself.)

(I moved this bit to zsh-workers.)

OK, so what I'm missing is that while the shell code might whizz through
there could be long delays in the backend outputting it to the terminal,
during which the shell is still executing bin_print() (and that's still
true even given your later remarks about queueing).

> I'm pretty sure SIGWINCH is an outlier case here and we should focus on
> the question of when the shell SHOULD react to window size changes,
> rather trying to identify all the builtins that should NOT react.
> 
> For example, we might *always* queue the SIGWINCH signal except when the
> shell is blocked in zleread (or is about to, but hasn't yet, displayed
> the prompt if ZLE is not active).  Those probably don't cover all the
> cases, but you get the idea.

I can see that it's an infrequent operation that's there to fix things
up for the user, i.e. needs handling on the timescale of human reactions
rather than, say, the timescale of Unix processes.  So yes, it looks
plausible it could be handled differently.

I suppose if a foreground process is running, it has to be done as at
present: the process gets the signal and zsh handles it when it gets
back control (but my knowledge of process groups is a bit basic).

pws


  parent reply	other threads:[~2013-04-26  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <klbmnc$ieh$1@ger.gmane.org>
     [not found] ` <130425111646.ZM17258@torch.brasslantern.com>
     [not found]   ` <klc0n1$34u$1@ger.gmane.org>
2013-04-26  0:53     ` Bart Schaefer
     [not found]   ` <20130425193817.2f82b60c@pws-pc.ntlworld.com>
     [not found]     ` <130425151839.ZM17476@torch.brasslantern.com>
2013-04-26  8:42       ` Peter Stephenson [this message]
     [not found]   ` <klc2ah$jiv$1@ger.gmane.org>
     [not found]     ` <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com>
2013-04-26 17:59       ` Yuri D'Elia
     [not found]     ` <130426080805.ZM18619@torch.brasslantern.com>
     [not found]       ` <517C0E09.4040505@users.sourceforge.net>
2013-04-27 22:31         ` Bart Schaefer
2013-04-28 15:30           ` Yuri D'Elia
2013-04-29  1:03             ` Bart Schaefer
2013-04-29  1:59               ` Bart Schaefer
2013-05-05  0:01               ` Frank Terbeck
2013-05-05  6:52                 ` Bart Schaefer
2013-05-05  9:38                   ` Frank Terbeck
2013-05-05 17:53                     ` Bart Schaefer
2013-05-05 18:37                       ` Frank Terbeck

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=20130426094248.42674faa@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).