[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode
From: |
Eli Zaretskii |
Subject: |
bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode |
Date: |
Thu, 21 Jan 2021 21:29:19 +0200 |
> 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.
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Tim Ruffing, 2021/01/21
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode,
Eli Zaretskii <=
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Lucas Werkmeister, 2021/01/21
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Eli Zaretskii, 2021/01/22
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Lucas Werkmeister, 2021/01/22
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Eli Zaretskii, 2021/01/22
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Tim Ruffing, 2021/01/22
- bug#46022: 27.1; kill-emacs should call sd_notify only in daemon mode, Eli Zaretskii, 2021/01/22