Skip to content

Commit

Permalink
Do return instead of crash on parasite not available
Browse files Browse the repository at this point in the history
Do not trigger crash when checkpointed PID with
parasite was externally terminated, and
parasite PID was already reaped by Memcr service process.
  • Loading branch information
adrianM27 committed Sep 30, 2024
1 parent dfeaa80 commit ae0d813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion memcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ae0d813

Please sign in to comment.