fix: align NSH build metadata and descriptor registration

This commit is contained in:
Kevin Yue committed 2026-11-02 15:33:22 +08:00
1 parent c84bfcc13a
commit 6ebffad3c8
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -47,7 +47,8 @@ impl DesktopClient {
fcntl(&fd, FcntlArg::F_SETFD(FdFlag::FD_CLOEXEC))?;
let flags = OFlag::from_bits_truncate(fcntl(&fd, FcntlArg::F_GETFL)?);
fcntl(&fd, FcntlArg::F_SETFL(flags | OFlag::O_NONBLOCK))?;
Ok(AsyncFd::new(fd)?)
// SAFETY: OwnedFd keeps this descriptor open and unchanged until AsyncFd drops it.
Ok(unsafe { AsyncFd::register(fd) }?)
}
Ok(Self {
input: pipe(input)?,