mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
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>
This commit is contained in:
@@ -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)
|
static void transport_name_gen(struct sockaddr_un *addr, int *len, int pid)
|
||||||
{
|
{
|
||||||
addr->sun_family = AF_UNIX;
|
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);
|
*len = SUN_LEN(addr);
|
||||||
*addr->sun_path = '\0';
|
*addr->sun_path = '\0';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user