[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to run --daemon in foreground?

From: Jean Louis
Subject: Re: How to run --daemon in foreground?
Date: Mon, 31 Oct 2016 15:41:31 +0300

Now I have found best solution for me to run emacs, by supervision of
s6-rc tools

if { s6-test -d /home/data1/protected/Work }
su - admin -s /bin/execlineb -c "/usr/bin/screen -S emacs -D -m -- 
/usr/bin/emacs --user admin --chdir /home/data1/protected"

The first line is only checking if directory exists, as it is only
there with encrypted partition. Not in the standard one.

The second one is taking all my user environment and starting screen
with emacs. If emacs exists for any reason, screen does not have a
shell to remain in background, but exists as well, due to execlineb
program, and daemon is respawned.

I still look into --start-server option, to heave it headless in


On Sun, Oct 30, 2016 at 08:19:26PM -0400, Glenn Morris wrote:
> Stefan Monnier wrote:
> > Actually, it should be possible to use a foreground process without
> > a tty by using "emacs --batch".  IIUC it will require fiddling to make
> > it work right, but it's be good if someone could try it and report its
> > experience (e.g. in the form of a bug-report).
> There's a 7-year old bug report with a simple patch to add equivalent
> functionality.
> It seems to me like a feature Emacs should have.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]