all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lucas Werkmeister <mail@lucaswerkmeister.de>
To: 31521@debbugs.gnu.org
Cc: Lucas Werkmeister <mail@lucaswerkmeister.de>
Subject: bug#31521: [PATCH] * src/emacs.c (kill-emacs): notify systemd
Date: Fri, 18 May 2018 22:27:27 +0200	[thread overview]
Message-ID: <20180518202727.17248-1-mail@lucaswerkmeister.de> (raw)

---

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






                 reply	other threads:[~2018-05-18 20:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180518202727.17248-1-mail@lucaswerkmeister.de \
    --to=mail@lucaswerkmeister.de \
    --cc=31521@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.