From: Daan De Meyer Date: Wed, 12 Apr 2023 10:08:27 +0000 (+0200) Subject: core: Send ERRNO= via notify socket on exit X-Git-Tag: v254-rc1~742^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88eec29d188f2ed18bff6b06ecd61d8c09db48f4;p=thirdparty%2Fsystemd.git core: Send ERRNO= via notify socket on exit --- diff --git a/src/core/main.c b/src/core/main.c index e49f6ab0940..6e3796f9dcc 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 &&