DIAG(spawn): emit trace to fd2 (+/scheme/debug); debug: scheme path was wrong

This commit is contained in:
Red Bear OS
2026-07-18 20:33:03 +09:00
parent e532daf4d5
commit e64c914319
+4 -1
View File
@@ -1265,7 +1265,10 @@ impl Pal for Sys {
) -> Result<pid_t> {
use crate::header::spawn::Flags;
let dbg = |m: &str| {
if let Ok(g) = FdGuard::open("debug:", syscall::O_WRONLY) {
// fd 2 (login's stderr -> pty -> fbcond -> serial) is proven to
// reach the capture; also try the kernel debug scheme directly.
let _ = syscall::write(2, m.as_bytes());
if let Ok(g) = FdGuard::open("/scheme/debug", syscall::O_WRONLY) {
let _ = syscall::write(g.as_raw_fd(), m.as_bytes());
}
};