From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27634 invoked from network); 23 Jun 1997 15:28:00 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1997 15:28:00 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA07552; Mon, 23 Jun 1997 11:19:01 -0400 (EDT) Resent-Date: Mon, 23 Jun 1997 11:19:01 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199706231522.LAA00907@hzoli.home> Subject: Re: zsh-3.0.3: another problem in Src/jobs.c In-Reply-To: <9706231051.AA04925@oz.fantasy.otsl.oki.co.jp> from SUZUKI Hisao at "Jun 23, 97 07:51:35 pm" To: suzuki@otsl.oki.co.jp (SUZUKI Hisao) Date: Mon, 23 Jun 1997 11:22:47 -0400 (EDT) Cc: zsh-workers@math.gatech.edu (Zsh hacking and development) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"fElWh.0.xr1.aFfhp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3287 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > 20 (or June 19 in GMT). You have made a right choice at last > for the present implementation for the time being! (I knock on > wood here :-) > > However, I am afraid I must say something still goes wrong. Try > this: > % emacs -nw & > % fg > [type ^X^C to terminate the emacs] > % stty > > [Note: this is not artificial. When you forget to set > DISPLAY, you will be put in the same situation.] > > As you see, the tty setting remains sane as long as you suspend > or continue the emacs job. Once you terminate the job, the tty > setting goes bad. > > If solely my patch of June 20 had applied, then this is not > happend when you _once_ suspend the "fg"ed emacs job before > terminate it. Now that you also changed Src/jobs.c from But it did happed when you did not suspend the fg'ed job, even with your patch, right? > > if (jn->stty_in_env && !jn->ty) { > jn->ty = (struct ttyinfo *) zalloc(sizeof(struct ttyinfo)); > to > if (shout && job == thisjob) { > if (!jn->ty) > jn->ty = (struct ttyinfo *) zalloc(sizeof(struct ttyinfo)); > > in lines 140-142, the problem was revealed. In zsh-3.0.4, it > happens whether you have once suspended the job or not. Still I think zsh is right here, and it is an emacs bug. The problem is emacs leaves the tty setting in a wrong state when it exits. I do not know how zsh can help here. Note that ksh does the same, even worse, since after this the ksh line editor becomes unusable, and I had to kill ksh from an other terminal. Zoltan