ctubbsii 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_r204529074
 
 

 ##########
 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:
   You're right. It doesn't matter. I was wrong. I don't know what I was 
thinking. Either way works for me. :smiley_cat:

----------------------------------------------------------------
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

Reply via email to