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

Re: Bug in 3.1.2-beta compared with -test1

Peter Stephenson wrote:
> Bruce Stephens wrote:
> > "sleep 1&" returns (or some other background job), some stty settings seem
> > wrong: eof, susp, etc., get zapped.  I've never noticed this in previous
> Any advance on the following patch?  inforeground seems to me to be
> the minimum you would need to do before grabbing the tty settings, so
> this can't be far wrong.  It seems to do the trick, anyway.

Yes, this patch seems to be OK.  Unfortunately the same bug is in zsh-3.0.3
so I may have to release zsh-3.0.4 with this one line fix.  The original
condition in zsh-3.1.1 was

    pgrp = gettygrp();           /* get process group of tty      */

    /* is this job in the foreground of an interactive shell? */
    if ((jn->gleader == pgrp || (pgrp > 1 && kill(-pgrp, 0) == -1)) &&
        !ttyfrozen && !val && !jn->stty_in_env)

Looks horrible, that cannot be right.  I did not notice this bug since I
use ttyctl -f.

That whole job control stuff looks like noone had any clue how it works so
everyone just put in more and more conditions until it seemd to work.  I
still do not fully understand everything here, but hopefully things are
better now.


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