From 321db0260f6f0324425e9a027305ebec47fd23ce Mon Sep 17 00:00:00 2001 From: Donghwa Jeong Date: Thu, 31 May 2018 17:58:08 +0900 Subject: [PATCH] start: fix waitpid() blocking issue Signed-off-by: Donghwa Jeong --- src/lxc/start.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lxc/start.c b/src/lxc/start.c index 8c8a7c3aa..05cecb58e 100755 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1901,6 +1901,11 @@ int __lxc_start(const char *name, struct lxc_handler *handler, goto out_abort; } + if (!handler->init_died && handler->pid > 0) { + ERROR("Child process is not killed"); + goto out_abort; + } + status = lxc_wait_for_pid_status(handler->pid); if (status < 0) SYSERROR("Failed to retrieve status for %d", handler->pid);