acpid: setrens before ready(), fixing deadlock.

Otherwise, an open call to /scheme/acpi/tables will result in nsmgr
blocking on an `openat(acpi_root, "tables")` call, which will never
occur if acpid is itself blocking on a `ForkNs` call to nsmgr before it
can serve any scheme requests.
This commit is contained in:
4lDO2
2026-06-05 11:03:32 +02:00
parent 718041b8b0
commit 9dd6901d59
+2 -2
View File
@@ -110,11 +110,11 @@ fn daemon(daemon: daemon::Daemon) -> ! {
register_sync_scheme(&socket, "acpi", &mut scheme)
.expect("acpid: failed to register acpi scheme to namespace");
libredox::call::setrens(0, 0).expect("acpid: failed to enter null namespace");
daemon.ready();
log::info!("acpid ready");
libredox::call::setrens(0, 0).expect("acpid: failed to enter null namespace");
let mut mounted = true;
while mounted {
let Some(event) = event_queue