[CRIU] [PATCH 1/2] restorer: add forgotten CLONE_FS flag for threads clone

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Fri Sep 23 07:41:45 PDT 2016


Threads must share fs struct. Without this path each thread has it's own fs
struct.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 criu/pie/restorer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 6790118..2e314e8 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -1388,7 +1388,7 @@ long __export_restore_task(struct task_restore_args *args)
 	if (args->nr_threads > 1) {
 		struct thread_restore_args *thread_args = args->thread_args;
 		long clone_flags = CLONE_VM | CLONE_FILES | CLONE_SIGHAND	|
-				   CLONE_THREAD | CLONE_SYSVSEM;
+				   CLONE_THREAD | CLONE_SYSVSEM | CLONE_FS;
 		long last_pid_len;
 		long parent_tid;
 		int i, fd;



More information about the CRIU mailing list