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

Redirection bug for stderr?



Hi!

I recently noticed a somewhat unexpected behaviour with a configuration-less zsh 5.0.7:

	 $ ls /root >/dev/null 2>&1
   $ ls /root 2>/dev/null | cat
   $ ls /root >/dev/null 2>&1 | cat
	 ls: cannot open directory /root: Permission denied

I believe last error line should not appear. The problem is about stream
redirection when piped. `ls /root` is just an example of command printing to
stderr.

On Arch Linux, zsh is built with:

	./configure --prefix=/usr \
		--docdir=/usr/share/doc/zsh \
		--htmldir=/usr/share/doc/zsh/html \
		--enable-etcdir=/etc/zsh \
		--enable-zshenv=/etc/zsh/zshenv \
		--enable-zlogin=/etc/zsh/zlogin \
		--enable-zlogout=/etc/zsh/zlogout \
		--enable-zprofile=/etc/zsh/zprofile \
		--enable-zshrc=/etc/zsh/zshrc \
		--enable-maildir-support \
		--with-term-lib='ncursesw' \
		--enable-multibyte \
		--enable-function-subdirs \
		--enable-fndir=/usr/share/zsh/functions \
		--enable-scriptdir=/usr/share/zsh/scripts \
		--with-tcsetpgrp \
		--enable-pcre \
		--enable-cap \
		--enable-zsh-secure-free

Any clue?

-- 
Pierre Neidhardt

Coming together is a beginning;
	keeping together is progress;
		working together is success.



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