From: Eli Zaretskii <eliz@gnu.org>
To: Tim Ruffing <public@timruffing.de>
Cc: 46022@debbugs.gnu.org, Lucas Werkmeister <mail@lucaswerkmeister.de>
Subject: bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode
Date: Thu, 21 Jan 2021 21:29:19 +0200 [thread overview]
Message-ID: <837do66qcw.fsf@gnu.org> (raw)
In-Reply-To: <1795381c3a29a50341502c2c020dccfcddf4be05.camel@timruffing.de> (message from Tim Ruffing on Thu, 21 Jan 2021 17:26:31 +0100)
> From: Tim Ruffing <public@timruffing.de>
> Date: Thu, 21 Jan 2021 17:26:31 +0100
>
> When run with --fg-daemon mode (as done by the provided systemd unit
> file "emacs.service"), emacs will call sd_notify() on startup to notify
> systemd about its status. On exit, emacs will call sd_notify()
> unconditionally, i.e., even when not run in daemon mode.
>
> This means that when the daemon is running, other emacs processes
> derived from the main process (e.g., in batch mode started by the async
> package) may send exit notifications when they're exiting, even though
> the main daemon process is not exiting. systemd will (correctly) ignore
> these notifications because they come from the wrong PID; this is the
> lucky default value of "NotifyAccess=main" in the systemd unit, i.e.,
> only the main PID may send notifications. However, systemd will also
> emit a warning in this case. With my config, this results in a lot of
> warning messages in the systemd user journal:
I'm not an expert on systemd, not even close, but please review the
reasoning for what we do in bug#31498, and let's take it from there.
Quote:
Both of these calls are successful no-ops if emacs was not started
by systemd.
CC'ing Lucas, who submitted that changeset, in case hoe would like to
comment.
next prev parent reply other threads:[~2021-01-21 19:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 16:26 bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode Tim Ruffing
2021-01-21 19:29 ` Eli Zaretskii [this message]
2021-01-21 20:12 ` Lucas Werkmeister
2021-01-22 8:19 ` Eli Zaretskii
2021-01-22 9:47 ` Lucas Werkmeister
2021-01-22 11:45 ` Eli Zaretskii
2021-01-22 12:07 ` Tim Ruffing
2021-01-22 12:31 ` Eli Zaretskii
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=837do66qcw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=46022@debbugs.gnu.org \
--cc=mail@lucaswerkmeister.de \
--cc=public@timruffing.de \
/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.