core: Send ERRNO= via notify socket on exit

This commit is contained in:
Daan De Meyer
2023-04-12 15:03:45 +02:00
parent 3a89cb84a6
commit 88eec29d18
+3
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 &&