From f30ffa4fac24fb98f038767aaa288ec6cfecb4a6 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 21 Jul 2011 12:59:44 +0200 Subject: [PATCH] [molecule.utils] prefer execvp() over subprocess.call() in forked process --- molecule/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/molecule/utils.py b/molecule/utils.py index 4d34a0d..986c644 100644 --- a/molecule/utils.py +++ b/molecule/utils.py @@ -104,8 +104,7 @@ def exec_chroot_cmd(args, chroot, pre_chroot = None, env = None): os.chroot(chroot) os.chdir("/") myargs = pre_chroot+args - rc = subprocess.call(myargs, env = env) - os._exit(rc) + os.execvp(myargs[0], myargs) else: RUNNING_PIDS.add(pid) rcpid, rc = os.waitpid(pid, 0)