When exiting with a signal run cleanup

This commit is contained in:
Kovid Goyal
2022-07-11 14:41:48 +05:30
parent ac5c312267
commit 2a1809a2d8

View File

@@ -382,7 +382,9 @@ read_from_zygote(void) {
int signum = WTERMSIG(child_exit_status);
if (signum > 0) {
signal(signum, SIG_DFL);
cleanup();
kill(getpid(), signum);
_exit(1);
}
} else if (WIFSTOPPED(child_exit_status)) {
child_state = CHILD_STOPPED;