]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: do not ignore the return value from the main loop
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Jan 2022 13:14:24 +0000 (14:14 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Feb 2022 10:13:24 +0000 (11:13 +0100)
commit5409c6fcc55e6700360546c42edd4a021ee5014e
treebffbe27adc70736f6b72ecf8dd1a084028826e9a
parentb87209f933d41c252b0489fe234435697b0683d0
manager: do not ignore the return value from the main loop

If manager_loop() fails, we would print an error message, but then actually
ignore the error in main(), and potentially execute the shutdown binary.
I'm not sure how likely this is to happen in practice, but it seems sloppy.
So let's do the cleanup, but actually freeze() if manager_loop() returned
an error.

invoke_main_loop() is refactored to return the manager objective. This way
we don't need to pass a separate parameter to specify whether we are
reexecuting. Subsequent patch will make further use of the returned objective.
src/core/main.c