Reap lxc-stop process to prevent zombification, closes #2
This commit is contained in:
parent
54c12759ee
commit
ba9baa9362
@ -194,8 +194,10 @@ class Container:
|
||||
|
||||
def do_stop(self):
|
||||
# Stop the current container and wait until it stops completely
|
||||
subprocess.Popen(['lxc-stop', '-P', config.CONTAINERS_DIR, self.name])
|
||||
lxc_stop = subprocess.Popen(['lxc-stop', '-P', config.CONTAINERS_DIR, self.name])
|
||||
self.await_state(ContainerState.STOPPED)
|
||||
# Reap the lxc-stop process
|
||||
lxc_stop.wait()
|
||||
|
||||
def execute(self, cmd, uid=None, gid=None, **kwargs):
|
||||
# If the container is starting or stopping, wait until the operation is finished
|
||||
|
Loading…
Reference in New Issue
Block a user