From: Zefram <zefram@dcs.warwick.ac.uk>
To: schaefer@nbn.com
Cc: zefram@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu
Subject: Re: signal weirdness
Date: Wed, 13 Nov 1996 18:03:01 +0000 (GMT) [thread overview]
Message-ID: <26092.199611131803@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <961113094120.ZM29104@candle.brasslantern.com> from "Bart Schaefer" at Nov 13, 96 09:41:19 am
> /* If the foreground job got a signal, pretend we got it, too. */
Oh.
>This code is intended to handle (among other things) the case where the
>user types the interrupt character when a foreground job is executing,
>thereby causing zsh to behave the same as if interrupt were typed at a
>bare prompt. Similarly, if the user typed the quit character, or if
>the foreground job got a HUP because the tty line dropped, we want zsh
>to notice and behave as if it got the signal as well. But (except for
>INT and QUIT), the signals are only interesting if they're trapped, as
>zsh normally ignores the rest.
I don't see the problem with just ignoring the situation, in the case
of key-generated interrupts. If the user wants to kill a program *and*
have the shell process a SIGINT handler, e can press ^C twice. HUP is
the only one that we really need to handle specially.
>Anyway, the code is more general than it needs to be -- there is only
>a subset of signals (HUP, INT, QUIT, TSTP, ...) that really need to be
>handled this way. On the other hand, there's no way to make a good
>comprehensive cross-platform list of all the signals that should be so
>treated, which is why it's as general as it is.
Shouldn't it be only INT, QUIT and HUP? I can't see any others that
could justifiably be treated this way.
> It might be possible
>to come up with a list of signals that we know should *not* be treated
>this way (BUS, FPE, SEGV, others?) and explicitly omit them, if this
>is really annoying for some reason.
It is very annoying. It seems like the shell is going out of its way
to cause inconvenience: without that code it would be easy to
distinguish between an external program crashing and the shell
crashing.
What does POSIX say about all of this?
-zefram
next prev parent reply other threads:[~1996-11-13 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-13 14:06 Zefram
1996-11-13 17:41 ` Bart Schaefer
1996-11-13 18:03 ` Zefram [this message]
1996-11-13 18:32 ` Bart Schaefer
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=26092.199611131803@stone.dcs.warwick.ac.uk \
--to=zefram@dcs.warwick.ac.uk \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.edu \
/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).