Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9058F200B51 for ; Mon, 1 Aug 2016 20:42:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8EE8B160A6C; Mon, 1 Aug 2016 18:42:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0955F160A66 for ; Mon, 1 Aug 2016 20:42:16 +0200 (CEST) Received: (qmail 23166 invoked by uid 500); 1 Aug 2016 18:42:16 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 23155 invoked by uid 99); 1 Aug 2016 18:42:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2016 18:42:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C24DEE058E; Mon, 1 Aug 2016 18:42:15 +0000 (UTC) From: btbytes To: dev@phoenix.apache.org Reply-To: dev@phoenix.apache.org References: In-Reply-To: Subject: [GitHub] phoenix pull request #186: cleanup sqlline-thin.py using python idioms. Content-Type: text/plain Message-Id: <20160801184215.C24DEE058E@git1-us-west.apache.org> Date: Mon, 1 Aug 2016 18:42:15 +0000 (UTC) archived-at: Mon, 01 Aug 2016 18:42:17 -0000 Github user btbytes commented on a diff in the pull request: https://github.com/apache/phoenix/pull/186#discussion_r73030368 --- Diff: bin/sqlline-thin.py --- @@ -18,64 +18,58 @@ # limitations under the License. # ############################################################################ - +from __future__ import print_function import os +import phoenix_utils import subprocess import sys -import phoenix_utils -import atexit import urlparse -global childProc -childProc = None -def kill_child(): - if childProc is not None: - childProc.terminate() - childProc.kill() - if os.name != 'nt': - os.system("reset") -atexit.register(kill_child) --- End diff -- I take half of that back. `childProc` is being used in `sqlline.py`, not in this script. I'll see if I can take care of zombie child processes in a cleaner way in both places. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---