Commit 605eae21 authored by topjohnwu's avatar topjohnwu

Remove unnecessary read/write

Close #5425
parent 93eb277a
......@@ -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) {
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment