keith-turner commented on a change in pull request #187: fixes #185 No longer
write to stdin
URL: https://github.com/apache/fluo-uno/pull/187#discussion_r204498226
##########
File path: bin/impl/util.sh
##########
@@ -59,3 +59,23 @@ function run_setup_script() {
shift
"$UNO_HOME/bin/impl/setup-$SCRIP.sh" "$@" 1>"$L_DIR/$SCRIP.stdout"
2>"$L_DIR/$SCRIP.stderr"
}
+
+function saveConsole {
+ UNO_CONSOLE=''
+ for fd in {0..200}; do
+ rco="$(true 2>/dev/null >&${fd}; echo $?)"
+ rci="$(true 2>/dev/null <&${fd}; echo $?)"
+ [[ "${rco}${rci}" = "11" ]] && UNO_CONSOLE=${fd} && break
+ done
+
+ exec {UNO_CONSOLE}>&1
+ export UNO_CONSOLE
+}
+
+function printToConsole {
+ if [ -z "$UNO_CONSOLE" ]; then
+ echo $1
+ else
+ echo >&${UNO_CONSOLE} $1
Review comment:
In the existing code the redirect preceded the arg for the echos. I am not
sure why it was like that, but I copied it. Anyway, I fixed it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services