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

Re: BUG: backgrounding zsh does bad tty stuff



On Feb 12,  5:03am, Geoff Wing wrote:
} Subject: BUG: backgrounding zsh does bad tty stuff
}
} Heyla,
} 
} % zsh-3.0.7 -f
} % echo $SHLVL
} 2
} % zsh-3.0.7 -f &
} [1] 19784

I immediately get

[1]  + suspended (tty output)  zsh -f

at this point, even with "stty -tostop".  Linux won't let any process
but the tty group leader poke settings into the tty driver.

What operating system are you using?

However, what did you expect?  "zsh -f" has no idea that it's in the
background, and attempts to start up ZLE as usual.  That's going to
play havoc with the parent shell's tty driver if the OS will let it
get away with it.

There's even a loop in init.c:init_io() where zsh repeatedly attempts to
force itself to be the tty foreground process, sending the pgrp leader
a SIGTTIN and then attempting to grab the tty.  Not pretty, but it has
been there for a very long time.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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