mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 12:37:39 +00:00
Fix stop magiskhide
This commit is contained in:
parent
96405c26d0
commit
5113f6d375
@ -20,10 +20,6 @@ map<int, vector<string_view>> uid_proc_map; /* uid -> list of process */
|
|||||||
// Locks the variables above
|
// Locks the variables above
|
||||||
pthread_mutex_t hide_state_lock = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t hide_state_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
#if !ENABLE_INJECT
|
|
||||||
static pthread_t monitor_thread;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void update_uid_map() {
|
void update_uid_map() {
|
||||||
mutex_guard lock(hide_state_lock);
|
mutex_guard lock(hide_state_lock);
|
||||||
uid_proc_map.clear();
|
uid_proc_map.clear();
|
||||||
|
@ -23,6 +23,7 @@ void ls_list(int client);
|
|||||||
|
|
||||||
#if !ENABLE_INJECT
|
#if !ENABLE_INJECT
|
||||||
// Process monitoring
|
// Process monitoring
|
||||||
|
extern pthread_t monitor_thread;
|
||||||
[[noreturn]] void proc_monitor();
|
[[noreturn]] void proc_monitor();
|
||||||
[[noreturn]] void test_proc_monitor();
|
[[noreturn]] void test_proc_monitor();
|
||||||
#else
|
#else
|
||||||
|
@ -20,6 +20,8 @@ static int inotify_fd = -1;
|
|||||||
|
|
||||||
static void new_zygote(int pid);
|
static void new_zygote(int pid);
|
||||||
|
|
||||||
|
pthread_t monitor_thread;
|
||||||
|
|
||||||
/******************
|
/******************
|
||||||
* Data structures
|
* Data structures
|
||||||
******************/
|
******************/
|
||||||
@ -281,6 +283,7 @@ void proc_monitor() {
|
|||||||
sigaddset(&block_set, SIGIO);
|
sigaddset(&block_set, SIGIO);
|
||||||
sigaddset(&block_set, SIGALRM);
|
sigaddset(&block_set, SIGALRM);
|
||||||
pthread_sigmask(SIG_UNBLOCK, &block_set, nullptr);
|
pthread_sigmask(SIG_UNBLOCK, &block_set, nullptr);
|
||||||
|
monitor_thread = pthread_self();
|
||||||
|
|
||||||
struct sigaction act{};
|
struct sigaction act{};
|
||||||
act.sa_handler = term_thread;
|
act.sa_handler = term_thread;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user