Subject: bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground

From: Glenn Morris <[email-masked]>
Date: Mon, 29 Feb 2016 12:08:49 -0500

Lars Ingebrigtsen wrote:

> Jameson Rollins <[email-masked]> writes:
>
>> This is a feature request more than a bug: I would really like to see
>> the ability to run the emacs server daemon ("emacs --daemon") in the
>> foreground.  This would be very useful.  I would like to be able to
>> start/control this daemon with a service supervisor (i.e. runit [0]).
>> This would allow me to easily start the daemon on system start up, and
>> have access to the daemon from all xsessions and virtual terminals.
>
> --daemon is a switch for running Emacs in the background.  If you don't
> want Emacs running in the background, you don't have to do anything in
> particular.

--daemon _should_ be a switch for running a "headless" Emacs.
The fact that it forks and runs in the background is not an essential
condition, and the justification for not doing so is provided in the
report. See eg "new-style daemons" on
https://www.freedesktop.org/software/systemd/man/daemon.html

I guess that systemd type = forking should be able to handle current
Emacs, but the above reference says that "new-style" daemons are
preferred.