Don't write newline character to cgroup node (#2804)

This prevents su hang on oplus devices, maybe related to bad kernel
hooks.
This commit is contained in:
Wang Han
2025-10-16 11:46:35 +08:00
committed by ShirkNeko
parent 8ff9fab414
commit cd78c2693a

View File

@@ -142,7 +142,7 @@ fn switch_cgroup(grp: &str, pid: u32) {
let fp = OpenOptions::new().append(true).open(path);
if let std::result::Result::Ok(mut fp) = fp {
let _ = writeln!(fp, "{pid}");
let _ = write!(fp, "{pid}");
}
}