Repository: drill
Updated Branches:
  refs/heads/master d0464ab9e -> db4829892


DRILL-4870 drill-config.sh sets JAVA_HOME incorrectly for the Mac

This closes #605


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

Branch: refs/heads/master
Commit: 17b96484998691687a00aa74cd69eef2fff6bae1
Parents: d0464ab
Author: Paul Rogers <prog...@maprtech.com>
Authored: Fri Oct 7 13:53:38 2016 -0700
Committer: Parth Chandra <par...@apache.org>
Committed: Fri Oct 14 10:53:31 2016 -0700

----------------------------------------------------------------------
 distribution/src/resources/drill-config.sh | 4 +++-
 distribution/src/resources/drillbit.sh     | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/17b96484/distribution/src/resources/drill-config.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-config.sh 
b/distribution/src/resources/drill-config.sh
index 387bcdd..737be36 100644
--- a/distribution/src/resources/drill-config.sh
+++ b/distribution/src/resources/drill-config.sh
@@ -392,5 +392,7 @@ export DRILL_HOME
 export DRILL_CONF_DIR
 export DRILL_LOG_DIR
 export CP
-export JAVA_HOME
+# DRILL-4870: Don't export JAVA_HOME. Java can find it just fine from the java
+# command. If we attempt to work it out, we do so incorrectly for the Mac.
+#export JAVA_HOME
 export JAVA

http://git-wip-us.apache.org/repos/asf/drill/blob/17b96484/distribution/src/resources/drillbit.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drillbit.sh 
b/distribution/src/resources/drillbit.sh
index 5f49ac7..16b6e27 100755
--- a/distribution/src/resources/drillbit.sh
+++ b/distribution/src/resources/drillbit.sh
@@ -102,7 +102,7 @@ waitForProcessEnd()
   # process still there : kill -9
   if kill -0 $pidKilled > /dev/null 2>&1; then
     echo "$commandName did not complete after $origcnt seconds, killing with 
kill -9 $pidKilled"
-    $JAVA_HOME/bin/jstack -l $pidKilled > "$logout" 2>&1
+    `dirname $JAVA`/jstack -l $pidKilled > "$logout" 2>&1
     kill -9 $pidKilled > /dev/null 2>&1
   fi
 }

Reply via email to