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

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



K"os"on"om szepen, Zoltan ur es zsh-workers!

Thank you for releasing the debugged zsh so promptly.  I got
zsh-3.0.4.tar.gz just now.  I see it works almost finely and
Src/jobs.c has changed in lines ca 157 from

	if (shout && !ttyfrozen && !jn->stty_in_env)
	     gettyinfo(&shttyinfo);
to
	if (shout && !ttyfrozen && !jn->stty_in_env &&
	    job == thisjob && !somestopped)
	    gettyinfo(&shttyinfo);

Yes, it is substantially the same patch as that of my message
<9706192332.AA00517@xxxxxxxxxxxxxxxxxxxxxxxxx> sent you on June
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

	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.

--
Hisao Suzuki <suzuki@xxxxxxxxxxxxxx>



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