You've already forked ZygiskNext
mirror of
https://github.com/Dr-TSNG/ZygiskNext.git
synced 2025-08-27 23:46:34 +00:00
refine tracing logic
This commit is contained in:
@@ -347,15 +347,18 @@ void wait_for_trace(int pid, int* status, int flags) {
|
|||||||
while (true) {
|
while (true) {
|
||||||
auto result = waitpid(pid, status, flags);
|
auto result = waitpid(pid, status, flags);
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
if (errno == EINTR) continue;
|
if (errno == EINTR) {
|
||||||
} else {
|
continue;
|
||||||
PLOGE("wait %d failed", pid);
|
} else {
|
||||||
exit(1);
|
PLOGE("wait %d failed", pid);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!WIFSTOPPED(*status)) {
|
if (!WIFSTOPPED(*status)) {
|
||||||
LOGE("process %d not stopped for trace: %s, exit", pid, parse_status(*status).c_str());
|
LOGE("process %d not stopped for trace: %s, exit", pid, parse_status(*status).c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user