Always close logd_fd during fork

This commit is contained in:
topjohnwu
2023-11-04 02:36:14 -07:00
parent 16ae4aedf1
commit 72b39594d3
2 changed files with 8 additions and 19 deletions

View File

@ -371,7 +371,7 @@ impl MagiskD {
.join(LOG_PIPE!());
unsafe {
libc::mkfifo(path.as_ptr(), 0o200);
libc::mkfifo(path.as_ptr(), 0o666);
libc::chown(path.as_ptr(), 0, 0);
let read = libc::open(path.as_ptr(), O_RDWR | O_CLOEXEC);
let write = libc::open(path.as_ptr(), O_WRONLY | O_CLOEXEC);