Project

General

Profile

« Previous | Next » 

Revision 9296

lib/sh/util.sh: command__set_fds(): cmd_log_fd = log_fd and can_log: don't call set_fds because no redirection is needed. this also avoids the need to increase the log_level of the set_fds call that used to set cmd_log_fd to itself.

View differences:

lib/sh/util.sh
436 436
function command__set_fds()
437 437
{
438 438
	ensure_nested_func
439
	local src
440
	if can_log; then src="&$log_fd"; else src=/dev/null; fi
441
	if test "$cmd_log_fd" = "$log_fd"; then log++; log++; fi # default case
439
	if can_log; then
440
		if test "$cmd_log_fd" = "$log_fd"; then return 0; fi # no redir needed
441
		local src="&$log_fd"
442
	else local src=/dev/null
443
	fi
442 444
	set_fds "$cmd_log_fd>$src"
443 445
}
444 446

  

Also available in: Unified diff