zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: zsh-3.1.9-dev-6 crashes occassionally
Date: Mon, 30 Oct 2000 09:56:30 +0000	[thread overview]
Message-ID: <0G38000F0MA56O@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Mon, 30 Oct 2000 09:32:00 +0100." <200010300832.JAA18859@beta.informatik.hu-berlin.de>

Sven wrote:
> We talked about this several times already. We either need to protect
> parts of the code (blocking signals there) or we should make the
> signal handlers do as little as possible, setting only some flags or
> something like that and call the trap handler shell-code somewhere
> else where it can be called savely. We `decided' to use the second
> solution, I think (and the first one is expensive and we have to find
> all the right places and...).

Yes, and I was thinking about this recently, since I have a similar
requirement where it would fit the bill.

> We could also use a mixture: a global flag that tells the signal code
> that it's save to invoke the trap handler right away but normally it
> would only make them be called later. That flag could be set when zsh
> is waiting for an external command, reading somethin or whatever.
> (This could be a good reason to finally write a function that is
> called everywhere zsh waits for something. And then we could allow
> modules to hook into it or something.)

I was hoping for the ability for modules to define their own traps,
unconnected with real signals, which would allow them to have an
asynchronous part for internal processing and a part that calls shell code
defined by the user.  You can get the effect with a hook, but special traps
make the interface more uniform.

I was also thinking about the possibility of having trashzle() called
automatically --- then you can get your function to produce output
apparently asynchronously, but actually when the keyboard read is
interrupted, and have the screen tidied up.  This would be very useful, but
I'm not clear how to get it to work: if the function doesn't know it's
going to produce output till after, you couldn't call trashzle() till the
end, which might have unexpected effects due to the tty settings.  On the
other hand, if you call trashzle() at the start and the function doesn't
produce output, you have surprised the user for no reason.

Needless to say I haven't got around to doing any work on this.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


  reply	other threads:[~2000-10-30  9:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-30  8:32 Sven Wischnowsky
2000-10-30  9:56 ` Peter Stephenson [this message]
2000-10-30 10:10 ` Thomas Köhler
2000-10-30 16:18 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-11-08 10:54 Sven Wischnowsky
2000-11-08  9:41 Sven Wischnowsky
2000-11-08 10:33 ` Thomas Köhler
2000-11-01  9:41 Sven Wischnowsky
2000-11-03 15:42 ` Bart Schaefer
2000-11-05 17:55   ` Thomas Köhler
2000-10-31 15:42 Sven Wischnowsky
2000-10-31 13:19 Sven Wischnowsky
2000-10-31 13:51 ` Peter Stephenson
2000-10-31 14:01   ` Sven Wischnowsky
2000-10-31 15:25     ` Bart Schaefer
2000-10-31 15:43       ` Andrej Borsenkow
2000-10-30 10:25 Sven Wischnowsky
2000-10-24  7:53 Sven Wischnowsky
2000-10-23 13:04 Sven Wischnowsky
2000-10-23 15:12 ` Thomas Köhler
2000-10-21 12:34 Thomas Köhler

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=0G38000F0MA56O@la-la.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.auc.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).