* bug#31521: [PATCH] * src/emacs.c (kill-emacs): notify systemd
@ 2018-05-18 20:27 Lucas Werkmeister
0 siblings, 0 replies; only message in thread
From: Lucas Werkmeister @ 2018-05-18 20:27 UTC (permalink / raw)
To: 31521; +Cc: Lucas Werkmeister
---
Notes:
This doesn’t do very much beyond changing what you see in `systemctl
status`, but I figure it doesn’t hurt either. (But feel free to
reject the patch if you disagree, I won’t mind.)
src/emacs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/emacs.c b/src/emacs.c
index f25e612664..d204dadb79 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2017,6 +2017,10 @@ all of which are called before Emacs is actually killed. */
{
int exit_code;
+#ifdef HAVE_LIBSYSTEMD
+ sd_notify(0, "STOPPING=1");
+#endif /* HAVE_LIBSYSTEMD */
+
/* Fsignal calls emacs_abort () if it sees that waiting_for_input is
set. */
waiting_for_input = 0;
--
2.17.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-18 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-18 20:27 bug#31521: [PATCH] * src/emacs.c (kill-emacs): notify systemd Lucas Werkmeister
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.