Files
RedBear-OS/local/patches/base/P2-daemon-ready-graceful.patch
T
vasilito 2d22c6ad59 chore: commit durable overlay state (configs, patches, recipe symlinks)
Pre-existing work from other sessions committed as durable state:
- local/config/drivers.d/ (8 driver configs)
- local/config/firmware-fallbacks.d/ (3 firmware configs)
- local/patches/base/, kernel/, relibc/ (new patch carriers)
- recipes/system/ symlinks (driver-params, acmd, ecmd, usbaudiod)

pkgar build artifacts and cache intentionally excluded.
2026-05-01 03:11:21 +01:00

24 lines
915 B
Diff

# P2-daemon-ready-graceful.patch
#
# Replace unwrap() in Daemon::ready() with graceful error handling.
# When hwd or pcid-spawner spawns a daemon fire-and-forget (dropping the
# pipe's read end before the child signals readiness), the unwrap() causes
# a BrokenPipe panic that kills the child and cascades into boot failures.
#
# The write may fail because init already closed the read end (service
# timeout, duplicate start, or oneshot completion). In all cases the
# daemon should continue running rather than panic.
diff --git a/daemon/src/lib.rs b/daemon/src/lib.rs
--- a/daemon/src/lib.rs
+++ b/daemon/src/lib.rs
@@ -51,7 +51,7 @@ impl Daemon {
/// Notify the process that the daemon is ready to accept requests.
pub fn ready(mut self) {
- self.write_pipe.write_all(&[0]).unwrap();
+ let _ = self.write_pipe.write_all(&[0]);
}
/// Executes `Command` as a child process.