Attempt to rescan zygote multiple times

Close #1654
This commit is contained in:
topjohnwu
2019-11-01 02:12:28 -04:00
parent f4299fbea8
commit 493068c073
4 changed files with 18 additions and 5 deletions

View File

@ -155,6 +155,10 @@ static void inotify_event(int) {
check_zygote();
}
static void check_zygote(int) {
check_zygote();
}
// Workaround for the lack of pthread_cancel
static void term_thread(int) {
LOGD("proc_monitor: cleaning up\n");
@ -312,6 +316,8 @@ void proc_monitor() {
sigaction(SIGTERMTHRD, &act, nullptr);
act.sa_handler = inotify_event;
sigaction(SIGIO, &act, nullptr);
act.sa_handler = check_zygote;
sigaction(SIGZYGOTE, &act, nullptr);
setup_inotify();