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

Re: Backticks In zshenv

On Oct 20,  3:35pm, Daniel Rigal wrote:
} Subject: Backticks In zshenv
} I am having a problem which is driving me up the wall! 
} Basically, Z-Shell seems to randomly decline to run commands
} in backticks in the zshenv (both the central one or the 
} user's own zshenv show this effect).

I've just seen the same problem, on a newly-installed RedHat 5.1 Linux
system with the zsh-3.0.5-2 RPM.  The /etc/zshenv file contains

	if [[ `id -u` -eq 0 ]]

and zsh randomly fails to capture the output of `id -u`.  It seems to
occur only when I rapidly exit and immediately log back in; if I wait
any longer than it takes to retype my login and password as fast as I
can, the problem disappears or becomes much more sporadic.

I ended up replacing `id -u` with $EUID and haven't seen any further
problems.  I'd assumed it was something about the "id" program.

I suspect zsh is getting some kind of a signal -- perhaps SIGWINCH? --
which is interrupting the read on the command substitution.

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

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