You've already forked ZygiskNext
mirror of
https://github.com/Dr-TSNG/ZygiskNext.git
synced 2025-08-27 23:46:34 +00:00
fix companion exec failed
This commit is contained in:
@@ -243,7 +243,7 @@ static bool ensure_daemon_created(bool is_64bit) {
|
|||||||
} else if (pid == 0) {
|
} else if (pid == 0) {
|
||||||
std::string daemon_name = "./bin/zygisk-cp";
|
std::string daemon_name = "./bin/zygisk-cp";
|
||||||
daemon_name += is_64bit ? "64" : "32";
|
daemon_name += is_64bit ? "64" : "32";
|
||||||
execl(daemon_name.c_str(), basename(daemon_name.c_str()), nullptr);
|
execl(daemon_name.c_str(), daemon_name.c_str(), nullptr);
|
||||||
PLOGE("exec daemon %s failed", daemon_name.c_str());
|
PLOGE("exec daemon %s failed", daemon_name.c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ fn create_daemon_socket() -> Result<UnixListener> {
|
|||||||
fn spawn_companion(name: &str, lib_fd: RawFd) -> Result<Option<UnixStream>> {
|
fn spawn_companion(name: &str, lib_fd: RawFd) -> Result<Option<UnixStream>> {
|
||||||
let (mut daemon, companion) = UnixStream::pair()?;
|
let (mut daemon, companion) = UnixStream::pair()?;
|
||||||
|
|
||||||
|
// FIXME: avoid getting self path from arg0
|
||||||
let process = std::env::args().next().unwrap();
|
let process = std::env::args().next().unwrap();
|
||||||
let nice_name = process.split('/').last().unwrap();
|
let nice_name = process.split('/').last().unwrap();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user