Move vendor property manipulation to late start

This commit is contained in:
topjohnwu
2020-05-17 14:45:08 -07:00
parent eca2168685
commit 97db49a57b
7 changed files with 83 additions and 77 deletions

View File

@ -95,7 +95,7 @@ static void check_zygote() {
crawl_procfs([](int pid) -> bool {
char buf[512];
snprintf(buf, sizeof(buf), "/proc/%d/cmdline", pid);
if (FILE *f = fopen(buf, "re"); f) {
if (FILE *f = fopen(buf, "re")) {
fgets(buf, sizeof(buf), f);
if (strncmp(buf, "zygote", 6) == 0 && parse_ppid(pid) == 1)
new_zygote(pid);
@ -167,7 +167,7 @@ static void term_thread(int) {
hide_set.clear();
attaches.reset();
// Misc
hide_enabled = false;
set_hide_state(false);
pthread_mutex_destroy(&monitor_lock);
close(inotify_fd);
inotify_fd = -1;