scripts/functions
changeset 3103 a8bf927f6e37
parent 3096 d1766c2273d1
child 3127 2af20cfd210b
     1.1 --- a/scripts/functions	Tue Oct 30 00:36:20 2012 +0000
     1.2 +++ b/scripts/functions	Tue Nov 06 17:02:06 2012 +0100
     1.3 @@ -46,7 +46,7 @@
     1.4              old_trap="$(trap -p ERR)"
     1.5              trap -- ERR
     1.6              (
     1.7 -                exec >&6
     1.8 +                exec >&6 2>&7 <&8
     1.9                  printf "\r         \n\nCurrent command"
    1.10                  if [ -n "${cur_cmd}" ]; then
    1.11                      printf ":\n  %s\n" "${cur_cmd}"
    1.12 @@ -131,7 +131,8 @@
    1.13  
    1.14  # Log policy:
    1.15  #  - first of all, save stdout so we can see the live logs: fd #6
    1.16 -exec 6>&1
    1.17 +# (also save stdin and stderr for use by CT_DEBUG_INTERACTIVE)
    1.18 +exec 6>&1 7>&2 8<&0
    1.19  #  - then point stdout to the log file
    1.20  tmp_log_file="${CT_TOP_DIR}/build.log"
    1.21  rm -f "${tmp_log_file}"