aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorGlenn Morris2016-11-15 23:28:47 -0800
committerGlenn Morris2016-11-15 23:28:47 -0800
commit36b99556dea23f17d5598bbed366e7201eec9fbb (patch)
treeb464455587a53e706288f95da497721c5c42a2c9 /doc/lispref
parent35007ad9daca9cac39fe758b5815aa6389379d38 (diff)
downloademacs-36b99556dea23f17d5598bbed366e7201eec9fbb.tar.gz
emacs-36b99556dea23f17d5598bbed366e7201eec9fbb.zip
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')
-rw-r--r--doc/lispref/display.texi2
-rw-r--r--doc/lispref/os.texi17
2 files changed, 11 insertions, 8 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 381edbac48a..d050738d80f 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -7166,7 +7166,7 @@ Emacs is displaying the frame on a character-based terminal.
7166@defvar initial-window-system 7166@defvar initial-window-system
7167This variable holds the value of @code{window-system} used for the 7167This variable holds the value of @code{window-system} used for the
7168first frame created by Emacs during startup. (When Emacs is invoked 7168first frame created by Emacs during startup. (When Emacs is invoked
7169with the @option{--daemon} option, it does not create any initial 7169as a daemon, it does not create any initial
7170frames, so @code{initial-window-system} is @code{nil}, except on 7170frames, so @code{initial-window-system} is @code{nil}, except on
7171MS-Windows, where it is still @code{w32}. @xref{Initial Options, 7171MS-Windows, where it is still @code{w32}. @xref{Initial Options,
7172daemon,, emacs, The GNU Emacs Manual}.) 7172daemon,, emacs, The GNU Emacs Manual}.)
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.
112It runs the normal hook @code{before-init-hook}. 112It runs the normal hook @code{before-init-hook}.
113 113
114@item 114@item
115If appropriate, it creates a graphical frame. This is not done if the 115If appropriate, it creates a graphical frame. This is not done in
116options @samp{--batch} or @samp{--daemon} were specified. 116batch (noninteractive) or daemon mode.
117 117
118@item 118@item
119It initializes the initial frame's faces, and sets up the menu bar 119It initializes the initial frame's faces, and sets up the menu bar
@@ -256,10 +256,10 @@ options were specified.
256@c last few bits of command-line-1 are not done in batch mode. 256@c last few bits of command-line-1 are not done in batch mode.
257 257
258@item 258@item
259If the option @code{--daemon} was specified, it calls 259If a daemon was requested, it calls @code{server-start}.
260@code{server-start}, and on Posix systems also detaches from the 260(On Posix systems, if a background daemon was requested, it then
261controlling terminal. @xref{Emacs Server,,, emacs, The GNU Emacs 261detaches from the controlling terminal.) @xref{Emacs
262Manual}. 262Server,,, emacs, The GNU Emacs Manual}.
263 263
264@item 264@item
265If started by the X session manager, it calls 265If started by the X session manager, it calls
@@ -337,7 +337,10 @@ Do not display a splash screen.
337Run without an interactive terminal. @xref{Batch Mode}. 337Run without an interactive terminal. @xref{Batch Mode}.
338 338
339@item --daemon 339@item --daemon
340Do not initialize any display; just start a server in the background. 340@itemx --old-daemon
341@itemx --new-daemon
342Do not initialize any display; just start a server.
343(An ``old-style'' daemon automatically runs in the background.)
341 344
342@item --no-init-file 345@item --no-init-file
343@itemx -q 346@itemx -q