help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs daemon (from master) fails as systemd service


From: Suvayu Ali
Subject: emacs daemon (from master) fails as systemd service
Date: Tue, 14 Nov 2023 15:53:50 +0000

Hi,

I've been using Emacs from master (7d42a762) for the last few months
because I wanted to try out tree-sitter.  It was working fine until I
updated it today.

When I start emacs normally `emacs -nw`, it starts up without issues.
When I manually start a daemon: `emacs --fg-daemon`, and connect from
another terminal with `emacsclient -nw`, that works as well.  However,
when I start emacs from systemd, it fails.  I log the stdout to a
file, and it has this:

  Error using execdir /opt/emacs/bin/:
  emacs: 
/opt/emacs/bin/../native-lisp/29.1-4c106e1f/preloaded/register-80045398-5a7974d5.eln:
cannot open shared object file: No such file or directory

I checked the directory /opt/emacs/, there is no "native-lisp"
directory, but the directory is writable.  So if it needs to be
generated, that's possible.

My service file looks like this (mostly same as upstream):

[Service]
Type=notify
StandardOutput=file:/tmp/emacs%U.log
StandardError=inherit

# delay to pick-up changes from `import-environment` in $HOME/.bash_profile
ExecStartPre=sleep 7
ExecStart=emacs --fg-daemon
ExecStop=emacsclient --eval "(save-some-buffers t)" \
                     --eval "(session-save-session)" --eval "(kill-emacs)"

# Emacs will exit with status 15 after having received SIGTERM, which
# is the default "KillSignal" value systemd uses to stop services.
SuccessExitStatus=15

Restart=on-failure

[Install]
WantedBy=default.target

Any idea what is going wrong?

Cheers,
-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]