Project

General

Profile

« Previous | Next » 

Revision 10771

bugfix: lib/sh/util.sh: stdout2fd(): don't add >&$fd redirect if the fd is 1, because redir does not currently support redirecting an fd to itself (due to bash bugs that require the dest fd to be closed before it can be reopened)

View differences:

lib/sh/util.sh
643 643
stdout2fd() # usage: fd=# stdout2fd cmd...
644 644
{
645 645
	echo_func; kw_params fd; : "${fd?}"
646
	local redirs=(">&$fd" "${redirs[@]}")
646
	if test "$fd" != 1; then local redirs=(">&$fd" "${redirs[@]}"); fi
647 647
	redir "$@"
648 648
}
649 649

  

Also available in: Unified diff