mirror of
https://github.com/systemd/systemd
synced 2024-07-23 03:04:57 +00:00
notify: Add EXIT_STATUS field
Whenever one of our tools or daemons exits, let's send the exit status via sd-notify in the EXIT_STATUS field.
This commit is contained in:
parent
3af48a86d9
commit
623a00020f
|
@ -170,6 +170,13 @@
|
|||
<literal>BUSERROR=org.freedesktop.DBus.Error.TimedOut</literal></para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>EXIT_STATUS=…</term>
|
||||
|
||||
<listitem><para>If a service exits, the return value of its <function>main()</function> function.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>MAINPID=…</term>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
r = impl; \
|
||||
if (r < 0) \
|
||||
(void) sd_notifyf(0, "ERRNO=%i", -r); \
|
||||
(void) sd_notifyf(0, "EXIT_STATUS=%i", ret); \
|
||||
ask_password_agent_close(); \
|
||||
polkit_agent_close(); \
|
||||
pager_close(); \
|
||||
|
|
Loading…
Reference in a new issue