[CRIU] [PATCH] restore: Report error if write into last pid failed
Cyrill Gorcunov
gorcunov at openvz.org
Mon Sep 28 10:20:34 PDT 2015
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
cr-restore.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cr-restore.c b/cr-restore.c
index b8b447399c2d..41f199ba2a56 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1116,8 +1116,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);
--
2.4.3
More information about the CRIU
mailing list