]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Send ERRNO= via notify socket on exit 27212/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 12 Apr 2023 10:08:27 +0000 (12:08 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 12 Apr 2023 13:03:45 +0000 (15:03 +0200)
src/core/main.c

index e49f6ab094020e6006df2096daef727a4ae89e17..6e3796f9dcc1319f580e344c0be281d3afd52020 100644 (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 &&