mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
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 commitdf1c53984f) (cherry picked from commitdf8359f418)
This commit is contained in:
1 parent
fa70856e77
commit
8d3cfaf548
3 files changed
+6
-6
No files matched your search
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
Reference in new issue
Block a user