From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4652 invoked from network); 24 Jun 1997 12:03:24 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Jun 1997 12:03:24 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id HAA22300; Tue, 24 Jun 1997 07:52:57 -0400 (EDT) Resent-Date: Tue, 24 Jun 1997 07:52:57 -0400 (EDT) Date: Tue, 24 Jun 97 20:56:54 JST Message-Id: <9706241156.AA10158@oz.fantasy.otsl.oki.co.jp> To: hzoli@ny.frontiercomm.net Cc: zsh-workers@math.gatech.edu In-Reply-To: <199706240252.WAA04438@hzoli.home> (message from Zoltan Hidvegi on Mon, 23 Jun 1997 22:52:42 -0400 (EDT)) Subject: Re: zsh-3.0.3: another problem in Src/jobs.c From: suzuki@otsl.oki.co.jp (SUZUKI Hisao) Organization: Oki Technosystems Laboratory, Inc., Nagoya, Japan Resent-Message-ID: <"jjmde3.0.KS5.PKxhp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3302 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >OK, here is an other patch. When a process started in the background in >the first place, zsh will ignore the tty settings it leaves after it >exits, even if it is brought to the foreground afterwards. > >This should fix the emacs problem, and even the suspend/fg workaround >will be unnecessary. Thank you! Now zsh works finely. Indeed It is the better patch for the present practically. But it is somewhat incomplete. Try this: % emacs -nw [type ^Z to suspend emacs] % bg % fg [type ^X^C to terminate emacs] You will see that the bg command needs a fix, too. The following is it: *** zsh-3.0.4/Src/builtin.c~ Mon Jun 23 14:12:46 1997 --- zsh-3.0.4/Src/builtin.c Tue Jun 24 19:56:35 1997 *************** *** 601,606 **** --- 601,607 ---- case BIN_FG: case BIN_BG: case BIN_WAIT: + if (func == BIN_BG) jobtab[job].stat |= STAT_NOSTTY; if ((stopped = (jobtab[job].stat & STAT_STOPPED))) makerunning(jobtab + job); else if (func == BIN_BG) { By the way, bash, tcsh and the old zsh-2.3.1 do well on the above example, too. They seem free from the emacs problem entirely. Moreover, zsh-2.3.1 does not ignore the stty changes done by a job started in the background. In spite of its many bugs and shortcomings, the old zsh-2.3.1 seems very robust and good in this particular respect... *sigh* -- Hisao Suzuki