strncpy(session->root_shm_path, root_shm_path,
sizeof(session->root_shm_path));
session->root_shm_path[sizeof(session->root_shm_path) - 1] = '\0';
strncpy(session->root_shm_path, root_shm_path,
sizeof(session->root_shm_path));
session->root_shm_path[sizeof(session->root_shm_path) - 1] = '\0';