[CRIU] Re: [PATCH 02/28] dump: open global image files with global helpers

Pavel Emelyanov xemul at parallels.com
Fri Mar 23 08:32:47 EDT 2012


On 03/23/2012 04:25 PM, Kinsbursky Stanislav wrote:
> 22.03.2012 22:57, Pavel Emelyanov пишет:
>> How about the pstree file? It's opened with these _glob_ helpers and
>> thus is no longer unlinked.
>>
> 
> No, it is not opened with _glob_ helpers.

Ah, I see. It's opened with _glob_ in restore _only_:

--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1167,7 +1167,7 @@ static int restore_task_with_children(void *_arg)
 
 	pr_info("%d: Starting restore\n", me->pid);
 
-	fd = open_image_ro_nocheck(FMT_FNAME_PSTREE, pstree_pid);
+	fd = open_glob_image_ro_nocheck(FMT_FNAME_PSTREE);
 	if (fd < 0) {
 		pr_perror("%d: Can't reopen pstree image", me->pid);
 		exit(1);

This is also wrong. GLobal files should be opened with _glob_ helper always.

Thanks,
Pavel



More information about the CRIU mailing list