mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Move daemon utilities from base to core
Move utilities that are exclusively used by the daemon (core module) from base to core: - fork_dont_care, fork_no_orphan, new_daemon_thread, init_argv0, set_nice_name, and switch_mnt_ns into utils.cpp - exec_command* functions and exec_t into scripting.cpp as static functions, as scripting is their sole consumer Also remove the unused exec_command_sync overload. Assisted-by: Gemini 3.8 Flash
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
|
||||
#include <base.hpp>
|
||||
|
||||
@@ -33,6 +31,15 @@ struct ModuleInfo;
|
||||
const char *get_magisk_tmp();
|
||||
void unlock_blocks();
|
||||
bool check_key_combo();
|
||||
int fork_dont_care();
|
||||
int fork_no_orphan();
|
||||
int switch_mnt_ns(int pid);
|
||||
void init_argv0(int argc, char **argv);
|
||||
void set_nice_name(Utf8CStr name);
|
||||
|
||||
using thread_entry = void *(*)(void *);
|
||||
extern "C" int new_daemon_thread(thread_entry entry, void *arg = nullptr);
|
||||
|
||||
template<typename T> requires(std::is_trivially_copyable_v<T>)
|
||||
T read_any(int fd) {
|
||||
T val;
|
||||
|
||||
Reference in New Issue
Block a user