summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-01-13 14:06:06 +0100
committerUlrich Müller <ulm@gentoo.org>2013-01-13 14:10:47 +0100
commit12e3ecb19d311b888abc118d806fee635602e3ee (patch)
tree372cb6b437662c738f87f152ec88f005791c7d59 /bin/eselect.in
parentWhitespace and quoting. (diff)
downloadeselect-12e3ecb19d311b888abc118d806fee635602e3ee.tar.gz
eselect-12e3ecb19d311b888abc118d806fee635602e3ee.tar.bz2
eselect-12e3ecb19d311b888abc118d806fee635602e3ee.zip
Restore stderr in die() function, bug 451150.
* bin/eselect.in (ESELECT_STDERR): Save stderr file descriptor. * libs/core.bash.in (die): Restore stderr, otherwise there would be no output if die was called while stderr is redirected. Fixes bug 451150. Thanks to Michał Górny <mgorny@gentoo.org>.
Diffstat (limited to 'bin/eselect.in')
-rwxr-xr-xbin/eselect.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/eselect.in b/bin/eselect.in
index 3f99f95..8fd1589 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -55,6 +55,11 @@ IFS=$' \t\n'
shopt -s extglob
shopt -s expand_aliases
+# Save stderr file descriptor
+# exec {ESELECT_STDERR}>&2 # >=bash-4.1
+exec 3>&2
+ESELECT_STDERR=3
+
# Load core functions
source "${ESELECT_CORE_PATH}/core.bash" || exit 255
# Load necessary functions for the main script