1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

core: Send ERRNO= via notify socket on exit

This commit is contained in:
Daan De Meyer 2023-04-12 12:08:27 +02:00
parent 3a89cb84a6
commit 88eec29d18

View File

@ -3096,6 +3096,9 @@ finish:
__lsan_do_leak_check();
#endif
if (r < 0)
(void) sd_notifyf(0, "ERRNO=%i", -r);
/* Try to invoke the shutdown binary unless we already failed.
* If we failed above, we want to freeze after finishing cleanup. */
if (arg_runtime_scope == RUNTIME_SCOPE_SYSTEM &&