Skip to content

Commit

Permalink
start: fix waitpid() blocking issue
Browse files Browse the repository at this point in the history
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
  • Loading branch information
2xsec committed May 31, 2018
1 parent b2a4850 commit 321db02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lxc/start.c
Expand Up @@ -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);
Expand Down

0 comments on commit 321db02

Please sign in to comment.