From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: make install does not setup systemd correctly Date: Mon, 16 Jul 2018 11:31:05 -0400 Message-ID: References: <20180715162748.5c9a123d@gmail.com> <20180716200307.50a7bbdb@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1531755010 12572 195.159.176.226 (16 Jul 2018 15:30:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 15:30:10 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Bingo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 16 17:30:06 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff5Ru-0003BH-7X for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 17:30:06 +0200 Original-Received: from localhost ([::1]:52419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5U1-0003UH-87 for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 11:32:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5St-0003HB-Ut for help-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff5Ss-0007hr-Pt for help-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:31:07 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:35104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ff5Ss-0007hY-KS for help-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:31:06 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id i12-v6so75588924oik.2 for ; Mon, 16 Jul 2018 08:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7869aAIXR0VDPcaM/VqaTK6G10U33KWXYFQaqXbdnMU=; b=mjh69XL/zN3BDVIZu63TNskfvKT810qUdgUcs4APOlcU2nSmNqRiLrK+g7sGPLUe9Q x0mDH3CDgljZyWHbUp37mA4uUIAv5FZSwRdBDj9mNHGWUhSYxECdztvNlGdcrsR5d0He pi+CvSFCKwGKlaejrO1fnXmnyzGEImfFdpTc2AdtMHIlXU27DzDuVCkP0zK9kH0P70RT 70cWaex8FpRMle/Ums8NZva/B8rdCg/1nsiG2ZotKC52Kj/j3RX0p0mENriYVhfcz92b G69kohH4kI0t/40IVFOdRzTV3sUnY+DKgmmoTWS5SYHClUY0+HnphxZXN9f5DhjOQXec j/EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7869aAIXR0VDPcaM/VqaTK6G10U33KWXYFQaqXbdnMU=; b=JBesTOiUROMUOpfJ0fumne8Gw4vW1yU1Z5zGUOQpo23m/QbOfZVn05Omqg3ZA4/xBQ J15HZVMhq3G+e2jCY7R5AKpU20plK5u8XELykzrc8SOMWSOfxMuijSYqUOtcQbnyLJyz a1DBIyNxxJ7mxnYe/BfC4FkLniXo2VIeQXjlkZPYgNGetgN8j9lkJllPejFtyWcSv29d Mj0OyNX4csKq0qlivBUvVOOfxEm/Myy4jnCiMxd15ShEzsZwtGTHs6O5DsVJmHuw1/zF YC58sHYOx1ez+n7x9FNFz9pfk1LWKvuWsjnRN3YuiC5dUqG4CZnPlRjnn1Rl67X/azmW C2qA== X-Gm-Message-State: AOUpUlHZ6veTSCnsJuq22Vdwp0OCKRZn3WDanxjBt3SlQRmScFDFuqtR HB0UFIzvokgdU4Bz8r2vsfzo6ZfAdOwz4d6fs5O/6w== X-Google-Smtp-Source: AAOMgpcXcIC9chOsCPRwHrWrznzuo31KpBgBzRfRms+YweVkXi+g9+VkdV5zcJqzz0vTQ1BrRI5v+TcqQQOzEJrWRSc= X-Received: by 2002:aca:4ac6:: with SMTP id x189-v6mr19411597oia.211.1531755065880; Mon, 16 Jul 2018 08:31:05 -0700 (PDT) Original-Received: by 2002:a4a:3b8d:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 08:31:05 -0700 (PDT) In-Reply-To: <20180716200307.50a7bbdb@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117464 Archived-At: On 16 July 2018 at 10:33, Bingo 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".