]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: fix waitpid() blocking issue
authorDonghwa Jeong <dh48.jeong@samsung.com>
Thu, 31 May 2018 08:58:08 +0000 (17:58 +0900)
committerDonghwa Jeong <dh48.jeong@samsung.com>
Thu, 31 May 2018 08:58:08 +0000 (17:58 +0900)
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
src/lxc/start.c

index 8c8a7c3aac58ed55d985f75aa3bf9bcc3f155bff..05cecb58ef54817636139cac1b6373641af3e41e 100755 (executable)
@@ -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);