From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18842 invoked from network); 25 Mar 1998 14:25:49 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 25 Mar 1998 14:25:49 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id JAA18663; Wed, 25 Mar 1998 09:20:24 -0500 (EST) Resent-Date: Wed, 25 Mar 1998 09:20:24 -0500 (EST) Message-Id: <199803251419.PAA20465@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: PATCH: don't read tty settings in zle Date: Wed, 25 Mar 1998 15:19:43 +0100 From: Peter Stephenson Resent-Message-ID: <"wY9Zx2.0.VZ4.dAH6r"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3818 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu (Look! There's real grammar in the subject line this time. Or, subject line grammar reality surprise, as I would usually put it.) Some time ago I complained that zsh was messing up my tty settings when I killed jobs in the background. I've had a closer look and found out it wasn't that simple. I have a completion function for kill which prints the job name as a comment after %no, and I habitually use it for killing things since I'm lazy. It was _this_ job exiting which caused the tty setting to be read, and since zle was active they were messed up: nothing to do with genuine job control. The answer is easy: don't get the current tty settings when zle is active. This patch is for 3.1.x, but probably applies to 3.0.5, too. *** Src/jobs.c.stty Tue Jan 13 11:41:56 1998 --- Src/jobs.c Wed Mar 25 15:07:12 1998 *************** *** 190,196 **** } } ! if (shout && !ttyfrozen && !jn->stty_in_env && job == thisjob && !somestopped && !(jn->stat & STAT_NOSTTY)) gettyinfo(&shttyinfo); --- 190,196 ---- } } ! if (shout && !ttyfrozen && !jn->stty_in_env && !zleactive && job == thisjob && !somestopped && !(jn->stat & STAT_NOSTTY)) gettyinfo(&shttyinfo); -- Peter Stephenson Tel: +39 50 844536 WWW: http://www.ifh.de/~pws/ Gruppo Teorico, Dipartimento di Fisica Piazza Torricelli 2, 56100 Pisa, Italy