diff --git a/src/core/main.c b/src/core/main.c index e49f6ab094..6e3796f9dc 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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 &&