diff --git bin/hive bin/hive index 643bb74..87be599 100755 --- bin/hive +++ 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