zsh-workers
 help / color / mirror / code / Atom feed
* signal weirdness
@ 1996-11-13 14:06 Zefram
  1996-11-13 17:41 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Zefram @ 1996-11-13 14:06 UTC (permalink / raw)
  To: Z Shell workers mailing list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-11-13 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-13 14:06 signal weirdness Zefram
1996-11-13 17:41 ` Bart Schaefer
1996-11-13 18:03   ` Zefram
1996-11-13 18:32     ` Bart Schaefer

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).