From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 276 invoked from network); 15 Dec 1996 01:35:53 -0000 Received: from dns.primenet.com.au (203.24.36.40) by coral.primenet.com.au with SMTP; 15 Dec 1996 01:35:53 -0000 Received: (qmail 259 invoked from network); 14 Dec 1996 22:33:48 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by dns.primenet.com.au with SMTP; 14 Dec 1996 22:33:48 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA16231; Sat, 14 Dec 1996 17:25:28 -0500 (EST) Resent-Date: Sat, 14 Dec 1996 17:25:28 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199612142215.XAA00693@hzoli.ppp.cs.elte.hu> Subject: Re: signal weirdness fix To: zefram@dcs.warwick.ac.uk (Zefram) Date: Sat, 14 Dec 1996 23:15:51 +0100 (MET) Cc: zsh-workers@math.gatech.edu In-Reply-To: <1934.199611260846@stone.dcs.warwick.ac.uk> from Zefram at "Nov 26, 96 08:46:51 am" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"xWs2A.0.Yz3.Nboio"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2585 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > Remember that odd behaviour I reported, that zsh thought it received a > signal actually sent to its foreground job? > > This patch limits it to SIGHUP, SIGINT and SIGQUIT, and disables this > behaviour completely in non-interactive shells. I think this is a good > semantic. Unfortunately the semantic we actually want (did the signal > actually originate at the tty) is impossible to implement, but I think > this is a close approximation. The right semantic is not impossible to implement. Actually it would probably be quite easy for someone who fully understands zsh's process and signal handling mechanism (unfortunately I do not understand it). Terminal signals are sent to all processes whose controlling terminal is the originating tty. The problem is that zsh waits for its child using sigsuspend which all signals bug HUP and CHLD blocked. There are other things which can be improved. There is the bug described in Etc/BUGS interrupting zsh -c 'cat a_long_file | less ; :'. Also I think that the pipe synchronization code can also be removed. Zoltan