mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-12 06:32:26 +00:00
Move first stage unload before fork
This commit is contained in:
@@ -140,7 +140,9 @@ DCL_HOOK_FUNC(int, jniRegisterNativeMethods,
|
||||
}
|
||||
|
||||
// Skip actual fork and return cached result if applicable
|
||||
// Also unload first stage zygisk if necessary
|
||||
DCL_HOOK_FUNC(int, fork) {
|
||||
unload_first_stage();
|
||||
return (g_ctx && g_ctx->pid >= 0) ? g_ctx->pid : old_fork();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user