zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: signal weirdness
Date: Wed, 13 Nov 1996 14:06:49 +0000 (GMT)	[thread overview]
Message-ID: <11873.199611131406@stone.dcs.warwick.ac.uk> (raw)

I got these results on Solaris 2.5.1 and SunOS 4.1.4, not tested
anywhere else.

Create a program called "segv", from this source or something equivalent:

main() { *(volatile char *)0 = 1; }

(I.e., the program will die with a SIGSEGV.)

Run the script:

trap 'echo SIGSEGV' SEGV
foo=$(segv)
echo finished
exit 0

When the segv program terminates, zsh acts as if it had received a
SIGSEGV (it executes the trap), despite the fact that it was its child
process that received it.  This doesn't happen if the signal is not
trapped.

The same happens if the command is run directly, rather than being
within $().

I'm not looking into this at the moment; I'm not familiar with the
signal code, and I have more urgent things to do.  I hope someone can
diagnose this.

-zefram


             reply	other threads:[~1996-11-13 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-13 14:06 Zefram [this message]
1996-11-13 17:41 ` Bart Schaefer
1996-11-13 18:03   ` Zefram
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=11873.199611131406@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --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).