From ae0d81336e81d38a0c20c520b80b41a9661769c8 Mon Sep 17 00:00:00 2001 From: Adrian Muzyka Date: Mon, 30 Sep 2024 09:43:39 +0000 Subject: [PATCH] Do return instead of crash on parasite not available Do not trigger crash when checkpointed PID with parasite was externally terminated, and parasite PID was already reaped by Memcr service process. --- memcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcr.c b/memcr.c index b66ffbb..f9c0b3a 100644 --- a/memcr.c +++ b/memcr.c @@ -2060,7 +2060,7 @@ static void *parasite_watch_thread(void *ptr) ret = wait4(pid, &status, __WALL, NULL); if (ret != pid) { fprintf(stderr, "[-] wait4() ret %d != parasite %ld, errno %m\n", ret, pid); - assert(ret == pid); + return NULL; } parasite_status_signal(pid, status);