Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 53c53a514 -> c30e4c6bd
sqlline.py doesn't propagate return code from Java process (Josh Elser) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c30e4c6b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c30e4c6b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c30e4c6b Branch: refs/heads/4.x-HBase-0.98 Commit: c30e4c6bde3b946a8e6503f42f934aaf44ac3697 Parents: 53c53a5 Author: Samarth <[email protected]> Authored: Thu Oct 15 11:31:34 2015 -0700 Committer: Samarth <[email protected]> Committed: Thu Oct 15 11:31:34 2015 -0700 ---------------------------------------------------------------------- bin/phoenix_sandbox.py | 3 +++ bin/sqlline.py | 4 ++++ 2 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/c30e4c6b/bin/phoenix_sandbox.py ---------------------------------------------------------------------- diff --git a/bin/phoenix_sandbox.py b/bin/phoenix_sandbox.py index c4fb841..7523ef7 100755 --- a/bin/phoenix_sandbox.py +++ b/bin/phoenix_sandbox.py @@ -57,3 +57,6 @@ except KeyboardInterrupt: proc.wait() print "Sandbox is stopped" +returncode = proc.returncode +if returncode is not None: + sys.exit(returncode) http://git-wip-us.apache.org/repos/asf/phoenix/blob/c30e4c6b/bin/sqlline.py ---------------------------------------------------------------------- diff --git a/bin/sqlline.py b/bin/sqlline.py index 80b5ff7..c61b205 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -64,4 +64,8 @@ java_cmd = 'java -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_ut childProc = subprocess.Popen(java_cmd, shell=True) #Wait for child process exit (output, error) = childProc.communicate() +returncode = childProc.returncode childProc = None +# Propagate Java return code to this script +if returncode is not None: + sys.exit(returncode)
