diff options
author | Glenn Morris <rgm@gnu.org> | 2016-11-15 23:28:47 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2016-11-15 23:28:47 -0800 |
commit | 36b99556dea23f17d5598bbed366e7201eec9fbb (patch) | |
tree | b464455587a53e706288f95da497721c5c42a2c9 /doc/lispref/os.texi | |
parent | 35007ad9daca9cac39fe758b5815aa6389379d38 (diff) | |
download | emacs-36b99556dea23f17d5598bbed366e7201eec9fbb.tar.gz |
Add --new-daemon, which runs in the foreground and does not fork
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.
Diffstat (limited to 'doc/lispref/os.texi')
-rw-r--r-- | doc/lispref/os.texi | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 97b086c0d37..3312705e167 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -112,8 +112,8 @@ compiled into the Emacs executable when it was built. It runs the normal hook @code{before-init-hook}. @item -If appropriate, it creates a graphical frame. This is not done if the -options @samp{--batch} or @samp{--daemon} were specified. +If appropriate, it creates a graphical frame. This is not done in +batch (noninteractive) or daemon mode. @item It initializes the initial frame's faces, and sets up the menu bar @@ -256,10 +256,10 @@ options were specified. @c last few bits of command-line-1 are not done in batch mode. @item -If the option @code{--daemon} was specified, it calls -@code{server-start}, and on Posix systems also detaches from the -controlling terminal. @xref{Emacs Server,,, emacs, The GNU Emacs -Manual}. +If a daemon was requested, it calls @code{server-start}. +(On Posix systems, if a background daemon was requested, it then +detaches from the controlling terminal.) @xref{Emacs +Server,,, emacs, The GNU Emacs Manual}. @item If started by the X session manager, it calls @@ -337,7 +337,10 @@ Do not display a splash screen. Run without an interactive terminal. @xref{Batch Mode}. @item --daemon -Do not initialize any display; just start a server in the background. +@itemx --old-daemon +@itemx --new-daemon +Do not initialize any display; just start a server. +(An ``old-style'' daemon automatically runs in the background.) @item --no-init-file @itemx -q |