use exec by default because we only one run tool at a time (forgot to commit this a while ago)
1 files changed, 6 insertions(+), 1 deletions(-) M gtgw
M gtgw +6 -1
@@ 21,6 21,7 @@ except ImportError: _xattr = None +USE_EXEC = True PROC_NAME = 'gtgw' GBASE = os.environ.get('GBASE', '/var/tmp/gtg-wrapper') @@ 117,7 118,11 @@ def tag_dir(cli): def run_subcommand(cli): - proc = subprocess.Popen(list(cli.ARG)) + argv = list(cli.ARG) + if USE_EXEC: + os.execvp(argv[0], argv) + # if we exec'ed we wont hit this line + proc = subprocess.Popen(argv) sts = proc.wait() sys.exit(sts)