diff --git a/molecule.py b/molecule.py index 78b47da..f370b7b 100644 --- a/molecule.py +++ b/molecule.py @@ -25,11 +25,6 @@ sys.path.insert(0,'molecule/') sys.path.insert(0,'.') import molecule.cmdline from molecule.handlers import Runner -from molecule.utils import RUNNING_PIDS - -def kill_pids(): - for pid in RUNNING_PIDS: - os.kill(pid, signal.SIGTERM) parse_data = molecule.cmdline.parse() if parse_data is None: @@ -46,12 +41,10 @@ for el in molecule_data_order: except KeyboardInterrupt: while True: my.kill() - kill_pids() break raise SystemExit(1) while True: my.kill() - kill_pids() break if rc != 0: raise SystemExit(rc) diff --git a/molecule/utils.py b/molecule/utils.py index cbb98c1..9b413eb 100644 --- a/molecule/utils.py +++ b/molecule/utils.py @@ -31,8 +31,6 @@ random.seed() from molecule.compat import convert_to_rawstring -RUNNING_PIDS = set() - def get_year(): """ @@ -153,9 +151,7 @@ def exec_chroot_cmd(args, chroot, pre_chroot = None, env = None): myargs = pre_chroot+args os.execvp(myargs[0], myargs) else: - RUNNING_PIDS.add(pid) rcpid, rc = os.waitpid(pid, 0) - RUNNING_PIDS.discard(pid) return rc def kill_chroot_pids(chroot, sig = signal.SIGTERM, sleep = False):