16 lines
650 B
Diff
16 lines
650 B
Diff
diff --git a/drivers/acpid/src/main.rs b/drivers/acpid/src/main.rs
|
|
index 059254b3..a43bab83 100644
|
|
--- a/drivers/acpid/src/main.rs
|
|
+++ b/drivers/acpid/src/main.rs
|
|
@@ -96,2 +96,8 @@ fn daemon(daemon: daemon::Daemon) -> ! {
|
|
- register_sync_scheme(&socket, "acpi", &mut scheme)
|
|
- .expect("acpid: failed to register acpi scheme to namespace");
|
|
+ if let Err(err) = register_sync_scheme(&socket, "acpi", &mut scheme) {
|
|
+ log::warn!(
|
|
+ "acpid: failed to register acpi scheme (error: {}). Another acpid instance may already own it.",
|
|
+ err
|
|
+ );
|
|
+ daemon.ready();
|
|
+ std::process::exit(0);
|
|
+ }
|