summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2016-11-15 23:28:47 -0800
committerGlenn Morris <rgm@gnu.org>2016-11-15 23:28:47 -0800
commit36b99556dea23f17d5598bbed366e7201eec9fbb (patch)
treeb464455587a53e706288f95da497721c5c42a2c9 /doc/emacs
parent35007ad9daca9cac39fe758b5815aa6389379d38 (diff)
downloademacs-36b99556dea23f17d5598bbed366e7201eec9fbb.tar.gz
emacs-36b99556dea23f17d5598bbed366e7201eec9fbb.tar.bz2
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/emacs')
-rw-r--r--doc/emacs/cmdargs.texi15
-rw-r--r--doc/emacs/glossary.texi4
-rw-r--r--doc/emacs/misc.texi9
3 files changed, 14 insertions, 14 deletions
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 444d30527f8..8d3d936b7b3 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -334,17 +334,18 @@ setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}).
@item -daemon
@opindex -daemon
-@itemx --daemon
+@itemx --daemon[=@var{name}]
@opindex --daemon
+@itemx --old-daemon[=@var{name}]
+@itemx --new-daemon[=@var{name}]
Start Emacs as a daemon---after Emacs starts up, it starts the Emacs
-server and disconnects from the terminal without opening any frames.
+server without opening any frames.
+(Optionally, you can specify an explicit @var{name} for the server.)
You can then use the @command{emacsclient} command to connect to Emacs
for editing. @xref{Emacs Server}, for information about using Emacs
-as a daemon.
-
-@item -daemon=@var{SERVER-NAME}
-Start emacs in background as a daemon, and use @var{SERVER-NAME} as
-the server name.
+as a daemon. An ``old-style'' daemon disconnects from the terminal
+and runs in the background (@samp{--daemon} is an alias for
+@samp{--old-daemon}).
@item --no-desktop
@opindex --no-desktop
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index bce97dacee2..d6489390ea5 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -338,8 +338,8 @@ or by rebinding key sequences (@pxref{Keymaps}).
@item Daemon
A daemon is a standard term for a system-level process that runs in the
background. Daemons are often started when the system first starts up.
-When Emacs runs in daemon-mode, it runs in the background and does not
-open a display. You can then connect to it with the
+When Emacs runs in daemon-mode, it does not
+open a display. You connect to it with the
@command{emacsclient} program. @xref{Emacs Server}.
@item Default Argument
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index cb0a1160516..2290dec31e2 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1583,11 +1583,10 @@ dies with the Emacs process.
@cindex daemon, Emacs
@item
-Run Emacs as a @dfn{daemon}, using the @samp{--daemon} command-line
-option. @xref{Initial Options}. When Emacs is started this way, it
-calls @code{server-start} after initialization, and returns control to
-the calling terminal instead of opening an initial frame; it then
-waits in the background, listening for edit requests.
+Run Emacs as a @dfn{daemon}, using one of the @samp{--daemon} command-line
+options. @xref{Initial Options}. When Emacs is started this way, it
+calls @code{server-start} after initialization and does not open an
+initial frame. It then waits for edit requests from clients.
@cindex systemd unit file
@item