1

I am attempting to set up a systemd daemon for emacs in NixOS. When I added a systemd unit, I noticed that it was continually restarting over and over again.

I discovered that this was because when I ran emacs --daemon, it would show all the initialization and then return, but when I ran ps -e | grep emacs, nothing would show up, so I assume that it forked a background process that somehow failed. The output from emacs --daemon is below.

How can I either get emacs --daemon to not fail after forking, or at least figure out how to debug the forked process?

Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /home/olynch/.emacs.d/core/core-load-paths.el (source)...
Loading /home/olynch/.emacs.d/core/core-load-paths.el (source)...done
Loading /home/olynch/.spacemacs...
Loading /home/olynch/.spacemacs...done
(Spacemacs) Warning: Cannot find font "Hack"!
Mark set
Mark set
Loading /home/olynch/.emacs.d/.cache/spacemacs-buffer.el (source)...
Loading /home/olynch/.emacs.d/.cache/spacemacs-buffer.el (source)...done
Mark set
Mark set
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/funcs.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/funcs.el (source)...done
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/keybindings.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/keybindings.el (source)...done
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/syntax-checking/config.el (source)...
Loading /home/olynch/.emacs.d/layers/syntax-checking/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/emacs-lisp/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/emacs-lisp/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+source-control/git/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+source-control/git/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/markdown/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/markdown/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/org/config.el (source)...
Loading /home/olynch/.emacs.d/layers/org/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/shell/config.el (source)...
Loading /home/olynch/.emacs.d/layers/shell/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/haskell/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/haskell/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/clojure/funcs.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/clojure/funcs.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/clojure/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/clojure/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/c-c++/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/c-c++/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/nixos/config.el (source)...
Loading /home/olynch/.emacs.d/layers/nixos/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+window-management/eyebrowse/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+window-management/eyebrowse/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/rust/funcs.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/rust/funcs.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/rust/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/rust/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/latex/funcs.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/latex/funcs.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/latex/config.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/latex/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/auto-completion/funcs.el (source)...
Loading /home/olynch/.emacs.d/layers/auto-completion/funcs.el (source)...done
Loading /home/olynch/.emacs.d/layers/auto-completion/config.el (source)...
Loading /home/olynch/.emacs.d/layers/auto-completion/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/spell-checking/config.el (source)...
Loading /home/olynch/.emacs.d/layers/spell-checking/config.el (source)...done
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs-base/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+distribution/spacemacs/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/syntax-checking/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/syntax-checking/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/emacs-lisp/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/emacs-lisp/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+source-control/git/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+source-control/git/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/markdown/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/markdown/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/org/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/org/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/org/extensions.el (source)...
Loading /home/olynch/.emacs.d/layers/org/extensions.el (source)...done
Loading /home/olynch/.emacs.d/layers/shell/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/shell/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+source-control/version-control/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+source-control/version-control/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/haskell/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/haskell/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/clojure/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/clojure/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/c-c++/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/c-c++/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/nixos/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/nixos/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/floobits/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/floobits/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/restclient/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/restclient/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/sql/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/sql/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/sql/extensions.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/sql/extensions.el (source)...done
Loading /home/olynch/.emacs.d/layers/+window-management/eyebrowse/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+window-management/eyebrowse/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/rust/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/rust/packages.el (source)...done
Loading /home/olynch/.emacs.d/private/writeroom/packages.el (source)...
Loading /home/olynch/.emacs.d/private/writeroom/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/latex/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/latex/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/latex/extensions.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/latex/extensions.el (source)...done
Loading /home/olynch/.emacs.d/layers/+lang/agda/extensions.el (source)...
Loading /home/olynch/.emacs.d/layers/+lang/agda/extensions.el (source)...done
Loading /home/olynch/.emacs.d/layers/auto-completion/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/auto-completion/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/spell-checking/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/spell-checking/packages.el (source)...done
Loading /home/olynch/.emacs.d/layers/deft/packages.el (source)...
Loading /home/olynch/.emacs.d/layers/deft/packages.el (source)...done
(Spacemacs) Warning: Agda not detected, be sure that Agda binaries are available in your PATH or check the installation instructions in the README file.
The variable evil-jumper-file is obsolete.  Persistence is done with savehist now.
Truncate long lines enabled

Starting new Ispell process /run/current-system/sw/bin/aspell with default dictionary...
Spacemacs is ready.
Restarting server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.