From: Marius Bakke <marius@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44669-done@debbugs.gnu.org
Subject: bug#44669: Shepherd loses track of elogind
Date: Wed, 18 Nov 2020 22:41:43 +0100 [thread overview]
Message-ID: <87mtzebaw8.fsf@gnu.org> (raw)
In-Reply-To: <87tutotme3.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]
Ludovic Courtès <ludo@gnu.org> skriver:
>> Now I no longer use SDDM (or any DM), but I was able to work around it
>> by adding #:pid-file:
>>
>> diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
>> index 265cf9f35f..6b7d832a44 100644
>> --- a/gnu/services/desktop.scm
>> +++ b/gnu/services/desktop.scm
>> @@ -770,7 +770,8 @@ seats.)"
>> #:environment-variables
>> (list (string-append "ELOGIND_CONF_FILE="
>> #$(elogind-configuration-file
>> - config)))))
>> + config)))
>> + #:pid-file "/run/systemd/elogind.pid"))
>> (stop #~(make-kill-destructor)))))
>
> LGTM. Now, if elogind is started behind the shepherd’s back, there’s
> still a race: shepherd removes the PID file before spawning the process,
> and then waits for that PID file to show up. Chances are shepherd will
> not notice that another elogind is already running, and thus the service
> will fail to start.
Right. If Shepherd actually deletes the PID file before attempting to
start the service, I think I just "won" the race in my testing...
>> The race between D-Bus and elogind should probably be handled by having
>> org.freedesktop.login1 consumers depend on the 'elogind' service instead?
>
> Yes, we could do that. Note that the only reason we just don’t let
> elogind be bus-activated is so it can handle events like lid close even
> before someone has attempted to log in (commit
> 94a881178af9a9a918ce6de55641daa245c92e73,
> <https://issues.guix.gnu.org/27580>).
Interesting. I wonder what other workarounds there are for this.
For now, I made SDDM simply depend on elogind in commit
0ae9bbe4f5f89e6f597bdb1f6df646fc5f504876.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
prev parent reply other threads:[~2020-11-18 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 21:51 bug#44669: Shepherd loses track of elogind Marius Bakke
2020-11-16 14:58 ` Ludovic Courtès
2020-11-16 17:37 ` Marius Bakke
2020-11-16 17:49 ` Marius Bakke
2020-11-17 8:31 ` Ludovic Courtès
2020-11-18 21:41 ` Marius Bakke [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtzebaw8.fsf@gnu.org \
--to=marius@gnu.org \
--cc=44669-done@debbugs.gnu.org \
--cc=ludo@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).