Commit 0516001f authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

restore: Report error if write into last pid failed

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 80b66ee1
......@@ -1121,8 +1121,10 @@ static inline int fork_with_pid(struct pstree_item *item)
}
len = snprintf(buf, sizeof(buf), "%d", pid - 1);
if (write(ca.fd, buf, len) != len)
if (write(ca.fd, buf, len) != len) {
pr_perror("%d: Write %s to %s", pid, buf, LAST_PID_PATH);
goto err_unlock;
}
} else {
ca.fd = -1;
BUG_ON(pid != INIT_PID);
......
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