Make log pipe a FIFO instead of anonymous pipe

This commit is contained in:
topjohnwu
2023-10-30 03:14:25 -07:00
parent a177846044
commit a6e50d3648
6 changed files with 76 additions and 29 deletions

View File

@@ -6,3 +6,17 @@ macro_rules! LOGFILE {
"/cache/magisk.log"
};
}
#[macro_export]
macro_rules! INTLROOT {
() => {
".magisk"
};
}
#[macro_export]
macro_rules! LOG_PIPE {
() => {
concat!($crate::INTLROOT!(), "/log")
};
}

View File

@@ -71,7 +71,7 @@ extern int app_process_32;
extern int app_process_64;
extern std::vector<module_info> *module_list;
const char *get_magisk_tmp();
extern "C" const char *get_magisk_tmp();
int connect_daemon(int req, bool create = false);
// Poll control

View File

@@ -26,6 +26,7 @@ extern std::string MAGISKTMP;
#define SELINUXMOCK INTLROOT "/selinux"
#define MAIN_CONFIG INTLROOT "/config"
#define MAIN_SOCKET INTLROOT "/socket"
#define LOG_PIPE INTLROOT "/log"
constexpr const char *applet_names[] = { "su", "resetprop", nullptr };