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

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



>> Jo napot kivanok!
>> (...or "Jo reggelt kivanok")
>
>Just for those, who do not speak Hungarian, these are just greetings
>meaning good day and good morning :-).  Where did you learn these (I'm
>just curious)?

I am an admirer of Kodaly and Bartok, who were both Hungarian
composers in (early) 20th century music, so I have been learning
Hungarian in hope of understanding their works thoroughly (and I
found it a very interesting language, which somewhat resembles
Japanese in several respects...)

By the way,

[snip]
>Here is Peter's patch:
>
>*** ./Src/jobs.c.old	Wed Jun  4 17:51:43 1997
>--- ./Src/jobs.c	Wed Jun  4 17:53:39 1997
[snip]
>!     if (shout && !ttyfrozen && !jn->stty_in_env && inforeground)
>  	gettyinfo(&shttyinfo);
[snip]

Aha!  A simple and elegant patch!  I am slightly worried since
it does not check the process group, but actually it seems to be
working very well.

However, I noticed a little bug (or, at least, a singular
behavior) just now.  The variable "inforeground" referred in the
patch will not be set true if the last command in a pipeline is
in the current shell.  Hence, though it is artificial,

	% stty erase ^H | :

has no effect since the last command is a shell builtin ":",
whereas

	% stty erase ^H | cat

will modify the tty setting since the last command is "cat".

I do not think whether the last command is in the shell or not
should be relevant in this case.  The following patch would be
better:

----------------------------------------------------------------
*** zsh-3.0.3/Src/jobs.c.ORIG	Tue Jun  3 05:11:27 1997
--- zsh-3.0.3/Src/jobs.c	Thu Jun 19 16:37:42 1997
***************
*** 154,160 ****
  	}
      }
  
!     if (shout && !ttyfrozen && !jn->stty_in_env)
  	gettyinfo(&shttyinfo);
  
      if (isset(MONITOR)) {
--- 154,160 ----
  	}
      }
  
!     if (shout && !ttyfrozen && !jn->stty_in_env && !somestopped && job == thisjob)
  	gettyinfo(&shttyinfo);
  
      if (isset(MONITOR)) {
----------------------------------------------------------------

Regards,

Hisao Suzuki <suzuki@xxxxxxxxxxxxxx>



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