Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-3.0.3: another problem in Src/jobs.c



>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 <suzuki@xxxxxxxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author