diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-04-12 12:08:27 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-04-12 15:03:45 +0200 |
commit | 88eec29d188f2ed18bff6b06ecd61d8c09db48f4 (patch) | |
tree | b4462432f475a344270ee17270701211509098c3 /src/core | |
parent | 3a89cb84a62314c3c4807016dbff4359d6988d79 (diff) | |
download | systemd-88eec29d188f2ed18bff6b06ecd61d8c09db48f4.tar.gz |
core: Send ERRNO= via notify socket on exit
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 && |