all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Bingo <right.ho@gmail.com>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: make install does not setup systemd correctly
Date: Mon, 16 Jul 2018 11:31:05 -0400	[thread overview]
Message-ID: <CAM-tV-92UFQ8mLY-B1RdY0qpwkDGbpxq0PHzj=ySdi1bpO9LEQ@mail.gmail.com> (raw)
In-Reply-To: <20180716200307.50a7bbdb@gmail.com>

On 16 July 2018 at 10:33, Bingo <right.ho@gmail.com> wrote:

>> >    On my Fedora installation, emacs 25.3 was already installed
>> >    in /usr/bin. In another
>> >    location (~/Downloads/emacs26/install/bin/emacs) , I installed
>> > emacs 27.0 from source using ./configure, make and make install.
>> > $PATH contains ~/Downloads/emacs26/install/ before /usr/bin.
>> >
>> > In this state, running "emacs --daemon" creates a emacs process,
>> > using the binary from ~/Downloads/emacs26/install as a subprocess
>> > of systemd.
>>
>> As far as I understand it, when you are running systemd, every process
>> is a subprocess of systemd, because it's the init process, so it's at
>> the root of the process tree.
>
> In my case, it is not exactly so. There is another, non-init, non PID
> 1 process of systemd , with PID 4142 in this case, under which these
> emacs daemons reside. To illustrate :
>
> bingo    4142     1  0 juil.15 ? 00:00:00 /usr/lib/systemd/systemd
> --user
>
> bingo    9976  4142  0 juil.15 ?
> 00:00:10 /home/bingo/Downloads/emacs26/install/bin/emacs --daemon

Ah, my guess this is due to the 'systemd --user' process setting
itself as a subreaper for any daemons you start (i.e., this is not an
Emacs-specific thing).

https://unix.stackexchange.com/questions/250153/what-is-a-subreaper-process

> I had checked the symlink /proc/9976/exe : it does point the way I
> expect from $PATH i.e. /home/bingo/Downloads/emacs26/install/bin/emacs.
>
> The emacs.service has an extremely version specific thing in it :
> "ExecStart=/usr/bin/emacs --daemon". This is an emacs binary which is
> 25.3 - but probably it could have been any version.

Oh, I was looking at the file in the repo, which just says
"ExecStart=emacs --daemon", but now I see that the install script adds
the absolute filename.
By the way, it was only added in 26.1, so I guess whoever packaged it
for Fedora backported it to your 25.3 package.

>> > 1. Emacs man page, or --help does not give an obvious way to not use
>> > systemd for its daemon. Is it supported at all ?
>>
>> I guess just don't use any "systemd operations"?
>
> The configuration that ships with emacs has, e.g.,
> Restart=on-failure
> ExecStart=/usr/bin/emacs --daemon
>
> I am guessing that emacs is coming under the "on-failure" condition
> somehow.

Not sure, do you actually see "/usr/bin/emacs --daemon" getting run?
In the status output you posted in the OP, I see it says "disabled".



      reply	other threads:[~2018-07-16 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-15 10:58 make install does not setup systemd correctly Bingo
2018-07-16  0:40 ` Noam Postavsky
2018-07-16 14:33   ` Bingo
2018-07-16 15:31     ` Noam Postavsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-92UFQ8mLY-B1RdY0qpwkDGbpxq0PHzj=ySdi1bpO9LEQ@mail.gmail.com' \
    --to=npostavs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=right.ho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.