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

RE: PATCH: loop killing



>
> The only difference, that I currently can see, is, that when it does not work,
> zsh is session leader:

Well, it does work with csh (that starts programs in seperate program group) and
does not work with ksh (that starts porgrams in it's own program group). It does
work if program is started alone and not as part of loop. Note the difference
(this is ksh, but the same is true for zsh):

This is for while true; zcat; done case:

bor@itsrm2:/tools/src/zsh-3.1.5-pws-23%> ps -jt pts/12
   PID  PGID   SID TTY      TIME CMD
  9064  9002  9002 pts/12   0:00 zcat
  9002  9002  9002 pts/12   0:00 ksh

And this is for the simple zcat case:

bor@itsrm2:/tools/src/zsh-3.1.5-pws-23%> ps -jt pts/12
   PID  PGID   SID TTY      TIME CMD
  9072  9072  9002 pts/12   0:00 zcat
  9002  9002  9002 pts/12   0:00 ksh

In the first case job PGID == SID and ^Z does not work (zcat gets TSTP but
[zk]sh never gets SIGCLD). In the second case job PGID != SID and all works like
a charm

Now, is it my system bug? Any idea?

/andrej



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