Revision 9296
Added by Aaron Marcuse-Kubitza about 11 years ago
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
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.