]> git.ipfire.org Git - pakfire.git/commitdiff
daemon: Return an error if we could not subscribe to signals
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:55:10 +0000 (16:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:55:10 +0000 (16:55 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/daemon.c

index 923926c28d043671efb218f486af87d2c404caf1..f857e27037336604d7d62bb137219e134a2e3123 100644 (file)
@@ -958,6 +958,10 @@ static int pakfire_daemon_setup_bus(struct pakfire_daemon* daemon) {
                pakfire_daemon_prepare_for_shutdown,
                daemon
        );
+       if (r < 0) {
+               ERROR(daemon->ctx, "Could not register PrepareForShutdown signal: %s\n", strerror(-r));
+               return r;
+       }
 
        return 0;
 }