userdbd/mountfsd/nsresourced: propagate exit status of the event loop

These daemons call sd_event_exit(m->event, EXIT_FAILURE) when workers
cannot be started, but run() ignored the positive return value of
sd_event_loop() and returned 0, so the daemon exited successfully and
the unit was not marked as failed. Return the exit status of the event
loop instead.

(cherry picked from commit df1c53984f)
(cherry picked from commit df8359f418)
This commit is contained in:
khromenokroman authored and Luca Boccassi committed 2026-11-05 14:48:09 +00:00
1 parent fa70856e77
commit 8d3cfaf548
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -35,7 +35,7 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Event loop failed: %m");
return 0;
return r;
}
DEFINE_MAIN_FUNCTION(run);
DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);
+2 -2
View File
@@ -39,7 +39,7 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Event loop failed: %m");
return 0;
return r;
}
DEFINE_MAIN_FUNCTION(run);
DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);
+2 -2
View File
@@ -52,7 +52,7 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Event loop failed: %m");
return 0;
return r;
}
DEFINE_MAIN_FUNCTION(run);
DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);