[CRIU] [PATCH 6a/16] restore: don't worry if an vma image file is absent
Andrey Vagin
avagin at openvz.org
Tue Nov 20 10:58:16 EST 2012
read_vmas will be called for zombies
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-restore.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/cr-restore.c b/cr-restore.c
index 276cf49..16e93ee 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -180,11 +180,17 @@ static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
{
int fd, ret = -1;
+ *nr_vmas = 0;
+
+ /* Skip errors, because a zombie doesn't have an image of vmas */
fd = open_image_ro(CR_FD_VMAS, pid);
- if (fd < 0)
- return fd;
+ if (fd < 0) {
+ if (errno == ENOENT)
+ return 0;
+ else
+ return fd;
+ }
- *nr_vmas = 0;
while (1) {
struct vma_area *vma;
VmaEntry *e;
--
1.7.11.7
More information about the CRIU
mailing list