zsh-workers
 help / color / mirror / code / Atom feed
From: suzuki@otsl.oki.co.jp (SUZUKI Hisao)
To: hzoli@ny.frontiercomm.net
Cc: zsh-workers@math.gatech.edu
Subject: Re: zsh-3.0.3: another problem in Src/jobs.c
Date: Tue, 24 Jun 97 20:56:54 JST	[thread overview]
Message-ID: <9706241156.AA10158@oz.fantasy.otsl.oki.co.jp> (raw)
In-Reply-To: <199706240252.WAA04438@hzoli.home> (message from Zoltan Hidvegi on Mon, 23 Jun 1997 22:52:42 -0400 (EDT))

>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@otsl.oki.co.jp>


  reply	other threads:[~1997-06-24 12:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-23 10:51 SUZUKI Hisao
1997-06-23 15:22 ` Zoltan Hidvegi
1997-06-24  2:05   ` SUZUKI Hisao
1997-06-24  2:52     ` Zoltan Hidvegi
1997-06-24 11:56       ` SUZUKI Hisao [this message]
     [not found] <3.0.1.32.19970624091754.01331150@home.incontext.com>
1997-06-25  1:10 ` SUZUKI Hisao
1997-06-25  3:10   ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1997-06-19  6:24 SUZUKI Hisao
1997-06-19  7:04 ` Zoltan Hidvegi
1997-06-19  7:26   ` Andrei Tcherepanov
1997-06-19 23:32   ` SUZUKI Hisao
1997-06-20  3:45     ` Zoltan Hidvegi
1997-06-20  8:20       ` SUZUKI Hisao
1997-06-19  8:58 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9706241156.AA10158@oz.fantasy.otsl.oki.co.jp \
    --to=suzuki@otsl.oki.co.jp \
    --cc=hzoli@ny.frontiercomm.net \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).