You've already forked ZygiskNext
mirror of
https://github.com/Dr-TSNG/ZygiskNext.git
synced 2025-08-27 23:46:34 +00:00
Show crash info correctly
This commit is contained in:
@@ -9,7 +9,8 @@ use libc::ENOENT;
|
||||
use log::{debug, error, info};
|
||||
use proc_maps::{get_process_maps, MapRange, Pid};
|
||||
use ptrace_do::{RawProcess, TracedProcess};
|
||||
use rustix::mount::mount_bind;
|
||||
use rustix::fs::UnmountFlags;
|
||||
use rustix::mount::{mount_bind, unmount};
|
||||
use rustix::path::Arg;
|
||||
use rustix::process::getpid;
|
||||
use crate::{constants, dl};
|
||||
@@ -321,7 +322,9 @@ pub fn main() -> Result<()> {
|
||||
&options,
|
||||
)?;
|
||||
mount_bind(constants::PATH_FUSE_PCL, constants::PATH_PCL)?;
|
||||
match session.guard.join() {
|
||||
let crash = session.guard.join();
|
||||
unmount(constants::PATH_PCL, UnmountFlags::DETACH)?;
|
||||
match crash {
|
||||
Err(e) => bail!("Fuse mount crashed: {:?}", e),
|
||||
_ => bail!("Fuse mount exited unexpectedly"),
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ pub enum RootImpl {
|
||||
Magisk,
|
||||
}
|
||||
|
||||
// FIXME: OnceCell bugs on 32 bit
|
||||
static mut ROOT_IMPL: RootImpl = RootImpl::None;
|
||||
|
||||
pub fn setup() {
|
||||
|
||||
@@ -18,7 +18,9 @@ static PROP_SECTIONS: LateInit<[String; 2]> = LateInit::new();
|
||||
|
||||
pub async fn main() -> Result<()> {
|
||||
let result = run().await;
|
||||
set_prop_hint(constants::STATUS_CRASHED)?;
|
||||
if result.is_err() {
|
||||
set_prop_hint(constants::STATUS_CRASHED)?;
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user