GNU bug report logs -
#73110
29.4; emacs.service failed with result 'timeout'
Previous Next
Full log
View this message in rfc822 format
Patrick Nicodemus <gadget142 <at> gmail.com> writes:
> Neither Eli or I proposed supporting this use case (using systemd as a
> service without compiling with support for libsystemd)
I didn't mean to say literally supporting but more like if there's a bug
from such a use case than it shouldn't be worth investing time in.
> I think it's perfectly valid to ask the user to compile Emacs with
> libsystemd support for this to work. Thus, this is a documentation bug.
Now looking at the service again made find the issue I think.
The service uses 'Type=notify' which means that Emacs has to tell
systemd that it is ready.
To quote systemd.service(5):
> Behavior of notify is similar to exec; however, it is
> expected that the service sends a "READY=1" notification
> message via sd_notify(3) or an equivalent call when it has
> finished starting up. systemd will proceed with starting
> follow-up units after this notification message has been
> sent. If this option is used, NotifyAccess= (see below)
> should be set to open access to the notification socket
> provided by systemd. If NotifyAccess= is missing or set to
> none, it will be forcibly set to main.
> Systemd is able to manage many programs on my computer without them being
> compiled with a special support for libsystemd, so I do not expect to
> require a special additional library to get Emacs to work if the
> documentation does not mention it.
It is able to but if a program opts into systemd features such
as notify it has to also support them.
> Chapter 40 of the manual does not indicate that running Emacs as a server
> is special non-core functionality, therefore as a user I assume that if
> this functionality is not working then it is broken, not that I
> misconfigured it at compile time. If this is supposed to be core
> functionality then the build should fail loudly if the dependencies are not
> found at compile time unless the user supplies the --without-libsystemd
> flag.
The service file would have to use another Type such as 'exec'
if not compiled with libsystemd support enabled during build.
>
> On Sun, Oct 13, 2024, 7:26 AM Björn Bidar <bjorn.bidar <at> thaodan.de> wrote:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> >> From: Patrick Nicodemus <gadget142 <at> gmail.com>
>> >> Date: Sat, 7 Sep 2024 13:22:30 -0400
>> >>
>> >> I want to run Emacs as a service and connect to it with a client. I
>> >> followed the instructions here:
>> >>
>> >>
>> https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html
>> >>
>> >> and ran the command
>> >> systemctl --user enable emacs
>> >>
>> >> This apparently creates a file at
>> >> ~/.config/systemd/user/default.target.wants/emacs.service
>> >> For some reason emacs is not successfully communicating to systemd that
>> >> it has launched successfully, and so systemd terminates emacs.
>> >
>> > According to this:
>> >
>> >> Configured features:
>> >> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
>> >> IMAGEMAGICK JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP
>> >> NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
>> >> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB
>> >
>> > your Emacs is built without libsystemd support, which I think is
>> > required for this to work? Or maybe I'm missing something.
>>
>> I don't know exactly if libsystemd is required for the service to work,
>> I think it shouldn't however, but why?
>> Why would use the systemd user service but also not built with
>> libsystemd?
>> Even if there's something wrong why support such as usecase?
>>
PS: I'm not sure about if there's a netiquette on this list but
top-posting and HTML mails are usually frowned upon.
This bug report was last modified 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.