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:
@@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user