test
This commit is contained in:
+6
-3
@@ -670,8 +670,11 @@ trap 'on_exit $?' EXIT
|
||||
trap 'on_pipe' PIPE
|
||||
trap 'on_return' RETURN
|
||||
|
||||
[[ -v SCRIPT ]] && BASH_ARGV0="${SCRIPT}" && shift
|
||||
|
||||
if [[ -v SCRIPT ]]; then
|
||||
BASH_ARGV0="${SCRIPT}"
|
||||
miaou_debug "<script found=$SCRIPT args_count=$#/>"
|
||||
[[ $# -gt 0 ]] && shift
|
||||
fi
|
||||
if is_true "$CHILD_PROCESS"; then
|
||||
# any nested children
|
||||
exec 4>/dev/tty 2>"$MIAOU_BASH_ERROR"
|
||||
@@ -679,7 +682,7 @@ if is_true "$CHILD_PROCESS"; then
|
||||
else
|
||||
# the MAIN Process
|
||||
if [[ -e /proc/$$/fd/3 ]]; then
|
||||
exec 4>&3 3>&- # swap fd 3 4 when fd 3 sent off
|
||||
exec 4>&3 3>&- # swap fd 3 4 + remove fd 3
|
||||
else
|
||||
MAIN_FD_MIAOU=true
|
||||
[[ -t 2 ]] && MAIN_FD_STDERR=false || MAIN_FD_STDERR=true
|
||||
|
||||
Reference in New Issue
Block a user