Commit dad20f6a authored by topjohnwu's avatar topjohnwu

Update zygote namespace

Close #1492
parent bb156710
...@@ -362,14 +362,18 @@ static bool check_pid(int pid) { ...@@ -362,14 +362,18 @@ static bool check_pid(int pid) {
} }
static void new_zygote(int pid) { static void new_zygote(int pid) {
if (zygote_map.count(pid))
return;
LOGD("proc_monitor: ptrace zygote PID=[%d]\n", pid);
struct stat st; struct stat st;
if (read_ns(pid, &st)) if (read_ns(pid, &st))
return; return;
auto it = zygote_map.find(pid);
if (it != zygote_map.end()) {
// Update namespace info
it->second = st;
return;
}
LOGD("proc_monitor: ptrace zygote PID=[%d]\n", pid);
zygote_map[pid] = st; zygote_map[pid] = st;
xptrace(PTRACE_ATTACH, pid); xptrace(PTRACE_ATTACH, pid);
......
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