From e55f38cae12e8017c71ac1ee2458379ff5a38ca5 Mon Sep 17 00:00:00 2001
From: Andrei Vagin <avagin@gmail.com>
Date: Sat, 12 Feb 2022 17:24:07 -0800
Subject: [PATCH 122/245] files: generate unique transport socket names
Transport socket names have to be unique for each criu run.
Fixes #1735 #1720
Signed-off-by: Andrei Vagin <avagin@gmail.com>
---
criu/files.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/files.c b/criu/files.c
index 69ebc2e82..429493ccb 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -957,7 +957,7 @@ static int receive_fd(struct fdinfo_list_entry *fle);
static void transport_name_gen(struct sockaddr_un *addr, int *len, int pid)
{
addr->sun_family = AF_UNIX;
- snprintf(addr->sun_path, UNIX_PATH_MAX, "x/crtools-fd-%d", pid);
+ snprintf(addr->sun_path, UNIX_PATH_MAX, "x/crtools-fd-%d-%" PRIx64, pid, criu_run_id);
*len = SUN_LEN(addr);
*addr->sun_path = '\0';
}
--
2.35.1