Remove unnecessary read/write

Close #5425
This commit is contained in:
topjohnwu 2022-02-11 00:24:12 -08:00
parent 93eb277a88
commit 605eae21bc
2 changed files with 4 additions and 2 deletions

View File

@ -362,7 +362,10 @@ static void get_process_info(int client, const sock_cred *cred) {
send_fds(client, fds.data(), fds.size());
}
// The following will only happen for system_server
if (uid != 1000 || process != "system_server")
return;
// Collect module status from system_server
int slots = read_int(client);
int id = 0;
for (int i = 0; i < slots; ++i) {

View File

@ -456,7 +456,6 @@ void HookContext::nativeSpecializeAppProcess_pre() {
} else if (fd >= 0) {
run_modules_pre(module_fds);
}
write_int(fd, 0);
close(fd);
close_fds();