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 authored and mkozlowski committed Sep 30, 2024
1 parent 26f11f6 commit b58f2b8
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 @@ -2065,7 +2065,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 b58f2b8

Please sign in to comment.