issue #625: use exec() instead of subprocess in mitogen_ansible_playbook

This is just to make CTRL+C handling less confusing. Alternate would be
ignoring SIGINT, but this is simpler.
This commit is contained in:
David Wilson 2019-08-17 11:51:25 +01:00
parent 0e489625ed
commit 8a870f1402
1 changed files with 5 additions and 1 deletions

View File

@ -3,4 +3,8 @@ import os
import subprocess
import sys
os.environ['ANSIBLE_STRATEGY'] = 'mitogen_linear'
subprocess.check_call(['./run_ansible_playbook.py'] + sys.argv[1:])
os.execlp(
'./run_ansible_playbook.py',
'./run_ansible_playbook.py',
*sys.argv[1:]
)