summaryrefslogtreecommitdiff
path: root/etc/emacs.service
Commit message (Collapse)AuthorAgeFilesLines
* * etc/emacs.service:Tim Ruffing2020-12-141-1/+5
| | | | | | | | | | | | | | | | * etc/emacs.service (ExecStart): Make Emacs exit from systemd work better (bug#45181). The problem here is the exit code 15, which emacs will return *only* if it has received SIGTERM. I believe what's happening here is that emacsclient will call kill-emacs but not wait until the emacs server has properly shut down. However, it's supposed to wait for the shutdown as an "ExecStop" command according to "man systemd.service". So since the process is still alive when emacsclient comes back, systemd will still issue SIGTERM, making emacs return 15 (maybe after calling kill- emacs again?!). Copyright-paperwork-exempt: yes
* Partially revert previous patch to emacs.serviceLars Ingebrigtsen2020-10-131-1/+1
| | | | | | * etc/emacs.service (ExecStop): Partially revert previous patch for bug#37847, since: "This appears to break packages that rely on `invocation-name' to be executable."
* Improve client/daemon xdg/systemd experienceCarlos Pita2020-08-091-1/+1
| | | | | | * Makefile.in: Add emacsclient.desktop generation. * etc/emacsclient.desktop: Add file, use emacsd as StartupWMClass. * etc/emacs.service: Run with name emacsd (bug#37847).
* Don't override SSH_AUTH_SOCK in the example emacs.service fileLars Ingebrigtsen2019-07-211-1/+3
| | | | | | * etc/emacs.service (ExecStop): Don't override SSH_AUTH_SOCK by default, because it varies by distribution where the socket is (bug#27620).
* Notify systemd in daemon-initialized and kill-emacs (Bug#31498)Lucas Werkmeister2018-07-251-1/+1
| | | | | | | | | | | | | | | With --[bg-]daemon and Type=forking, systemd will only consider the daemon to have fully started up once the original process exits, and will wait until then to start units depending on the Emacs service. To get the same functionality with --fg-daemon, use Type=notify instead of Type=simple and explicitly send a readiness notification to systemd at the point where the forked process would in --bg-daemon mode notify its parent process and cause it to exit. Similarly, notify systemd at the beginning of the shutdown process as well. (Both of these calls are successful no-ops if emacs was not started by systemd.) * etc/emacs.service: Update Type. * src/emacs.c (daemon-initialized) [HAVE_LIBSYSTEMD]: * src/emacs.c (kill-emacs) [HAVE_LIBSYSTEMD]: Call sd_notify().
* Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'Noam Postavsky2017-05-291-1/+1
| | | | | | | | | | * doc/emacs/cmdargs.texi (Initial Options): * doc/lispref/os.texi (Startup Summary): * etc/NEWS: * etc/emacs.service: * src/emacs.c (main): * src/lisp.h: Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'.
* Add --new-daemon, which runs in the foreground and does not forkGlenn Morris2016-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | This is intended for modern init systems such as systemd, which manage many of the traditional aspects of daemon behavior themselves. (Bug#2677) * src/emacs.c (daemon_type): New integer. (usage, standard_args): Add --old-daemon and --new-daemon. (main): Handle --old-daemon and --new-daemon arguments. Restrict all the forking and complicated daemon stuff to old-daemon. (Fdaemon_initialized): Handle new-style daemon. * src/lisp.h (IS_DAEMON, DAEMON_RUNNING) [!WINDOWNT]: Replace daemon_pipe with daemon_type. * doc/emacs/cmdargs.texi (Initial Options): * doc/emacs/glossary.texi (Glossary): * doc/emacs/misc.texi (Emacs Server): * doc/lispref/display.texi (Window Systems): * doc/lispref/os.texi (Startup Summary): Related doc updates. * etc/NEWS: Mention this. * etc/emacs.service: Use Type=simple and --new-daemon.
* Include a systemd user unit file. (Bug#16507)Glenn Morris2016-11-131-0/+17
* etc/emacs.service: New file. * doc/emacs/misc.texi (Emacs Server): Mention systemcl --user. * Makefile.in (libdir): New, set by configure. (systemdunitdir): New variable. (install-etc, uninstall): Handle the emacs.service file.