You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2018/05/02 18:32:04 UTC

hive git commit: HIVE-19231: Beeline generates garbled output when using UnsupportedTerminal (Naveen Gangam, reviewed by Aihua Xu)

Repository: hive
Updated Branches:
  refs/heads/master bf8d305a6 -> ad6dd9ed3


HIVE-19231: Beeline generates garbled output when using UnsupportedTerminal (Naveen Gangam, reviewed by Aihua Xu)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ad6dd9ed
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ad6dd9ed
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ad6dd9ed

Branch: refs/heads/master
Commit: ad6dd9ed36c2f84d720d684836030ffc8ec13d59
Parents: bf8d305
Author: Naveen Gangam <ng...@apache.org>
Authored: Mon Apr 23 13:53:11 2018 -0400
Committer: Naveen Gangam <ng...@apache.org>
Committed: Wed May 2 14:31:28 2018 -0400

----------------------------------------------------------------------
 bin/hive | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ad6dd9ed/bin/hive
----------------------------------------------------------------------
diff --git a/bin/hive b/bin/hive
index 643bb74..87be599 100755
--- a/bin/hive
+++ b/bin/hive
@@ -344,7 +344,7 @@ fi
 
 if [[ "$SERVICE" =~ ^(hiveserver2|beeline|cli)$ ]] ; then
   # If process is backgrounded, don't change terminal settings
-  if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then
+  if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) && ( ! $(ps -o tty= -p $$) =~ "?" ) ]]; then
     export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
   fi
 fi