Document unsafe contracts and stop reusing poisoned state

This commit is contained in:
Samuel Onoja committed 2026-10-22 01:28:03 +01:00
1 parent a7fcd69897
commit f2e728b503
46 files changed
+377 -45

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ impl Read for Output {
};
// The pipe has exactly one reader. Once readable (or hung up), a
// pipe read returns available bytes (or EOF) without filling bytes.
// SAFETY: fd is a live pollfd and the count of one matches its writable storage.
let result = unsafe { libc::poll(&mut fd, 1, 20) };
if result > 0 {
return self.pipe.read(bytes);