summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2014-09-02 21:04:08 (GMT)
committerYann E. MORIN <yann.morin.1998@free.fr>2014-09-02 21:11:59 (GMT)
commit2864ae93aff78f91932e1a73ad45c692be81404c (patch)
tree3dd59b304548375916b31ec7f050079b5c49bb07 /scripts/crosstool-NG.sh.in
parentde6b6733947c65908efa6b7e98015136553a8f44 (diff)
scripts: properly restore stdout/err/in at the end
Byt the end of the main script, the log file is being moved and compressed, and the final destination might become read-only at any time, so we consign stdout/err to oblivion. This is incorrect, as some actions after may still fail (out of space, for example). So, properly restore stdout/err, but also stdin (useless, but harmless) instead, so the user has a chance to see the error, especially since it is not logged into the log file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 3359bac..cd65d5b 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -655,9 +655,9 @@ CT_DoEnd INFO
# From now-on, it can become impossible to log any time, because
# either we're compressing the log file, or it can become RO any
-# moment... Consign all ouptut to oblivion...
+# moment... Restore original stdout, stderr and stdin
CT_DoLog INFO "Finishing installation (may take a few seconds)..."
-exec >/dev/null 2>&1
+exec >&6 2>&7 <&8
rm -f ${CT_PREFIX_DIR}/build.log.bz2
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
cp "${tmp_log_file}" "${CT_PREFIX_DIR}/build.log"