mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05:30 +00:00
Small code restructuring
This commit is contained in:
parent
771e500468
commit
a4a661bf34
@ -391,7 +391,11 @@ void proc_monitor() {
|
||||
ptrace(PTRACE_DETACH, pid, 0, 0);
|
||||
}
|
||||
});
|
||||
if (WIFSTOPPED(status)) {
|
||||
if (!WIFSTOPPED(status)) {
|
||||
// Nothing to do with us
|
||||
PTRACE_LOG("terminate\n");
|
||||
DETACH_AND_CONT;
|
||||
}
|
||||
if (detaches[pid]) {
|
||||
PTRACE_LOG("detach\n");
|
||||
DETACH_AND_CONT;
|
||||
@ -455,10 +459,5 @@ void proc_monitor() {
|
||||
xptrace(PTRACE_CONT, pid, nullptr, WSTOPSIG(status));
|
||||
PTRACE_LOG("signal [%d]\n", WSTOPSIG(status));
|
||||
}
|
||||
} else {
|
||||
// Nothing to do with us
|
||||
PTRACE_LOG("terminate\n");
|
||||
DETACH_AND_CONT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user