Commit 2b1021a4 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

restore: actually fail if clone() fails

Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7158448d
......@@ -982,8 +982,11 @@ static inline int fork_with_pid(struct pstree_item *item)
ret = clone(restore_task_with_children, ca.stack_ptr,
ca.clone_flags | SIGCHLD, &ca);
if (ret < 0)
if (ret < 0) {
pr_perror("Can't fork for %d", pid);
goto err_unlock;
}
if (item == root_item)
item->pid.real = ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment