From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id QOyGH96UGmYWTwEAe85BDQ:P1 (envelope-from ) for ; Sat, 13 Apr 2024 16:21:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QOyGH96UGmYWTwEAe85BDQ (envelope-from ) for ; Sat, 13 Apr 2024 16:21:18 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713018078; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vY8iBOnrMQZWpHP0wbtTkF2mJfbVNerRpUWEMgJQQPk=; b=jLxqjXgeoVZbw9qGUrSJGH5Q/ZP2uqJgLxUKmUjxAIgqzFlhk3Nw2Op5DlmbQfVhdskWQv 91nMV7b3SeE5Ly3RSzmacn3e3hSn03xpK2pZR5FLRqysbAXqKFY5SsqgiiP3UHDJNu3dmt HBdhdKupaMAxo6JYh/jpFKGKfrofkCH8vZ3K2qZCRXmvFpXptHqEze9A1pOGFXDO2+F9Md VcOe32Iks++euGySnEtU7CotiOo61lENswRZXjMrDRaPqBX+g7el/iop/sGLGOAwwTCNXw MeQt6L/UuhmLZcMQVa+lxhvM8v2ZmTQjLl/K4IH//HTX2I8ITmjYc386bpIFwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713018078; a=rsa-sha256; cv=none; b=f7oWGGOUlA5nEWQ5QgmzbTcW466+tBBwn2xHTPDv4mOhcVdQAIASJe94nBl601xVHwa2F1 tRPcmaY5W2+TF4JJzi0TcnLPwMI84Nt7eU9K5LPbnj1kqsxB6KSwP1vT/CLXPUsu/0EHAT bX0LVrMH5VSzDHBp98OfkzD19d7Hfcssw21C/iyKl9EvlWpHh42mXXOz8UMSUqaBAzUH7m +WX8cpwVnxgVAk12fiwIkGlFgbwdp6NO2NsaMRuB5clOaQAfN30GQIp2EdzBmrPiM/6Fa4 ky8em02yLzMx72wuvRbbGjIFPfRHhStSTrA4l1w0VpEuekcRkj8nWkyUX5GWrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 69C5C231C5 for ; Sat, 13 Apr 2024 16:21:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rveFK-000511-8q; Sat, 13 Apr 2024 10:20:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rveFI-00050t-TN for guix-devel@gnu.org; Sat, 13 Apr 2024 10:20:44 -0400 Received: from 9.mo576.mail-out.ovh.net ([46.105.56.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rveFG-0001Bx-K3 for guix-devel@gnu.org; Sat, 13 Apr 2024 10:20:44 -0400 Received: from director3.ghost.mail-out.ovh.net (unknown [10.108.9.148]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 4VGwZY1yt6z1fjy for ; Sat, 13 Apr 2024 14:20:37 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-87v99 (unknown [10.110.178.33]) by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A0F751FDAE; Sat, 13 Apr 2024 14:20:36 +0000 (UTC) Received: from ngraves.fr ([37.59.142.101]) by ghost-submission-6684bf9d7b-87v99 with ESMTPSA id kv/lI7SUGmYSwgAAc4qcLg (envelope-from ); Sat, 13 Apr 2024 14:20:36 +0000 X-OVh-ClientIp: 81.67.146.208 To: Ludovic =?utf-8?Q?Court=C3=A8s?= , "Nicolas Graves via Development of GNU Guix and the GNU System distribution." Cc: emacs-devel@gnu.org, Andrew Tropin , Stefan Monnier Subject: Re: [Nicolas Graves] [PATCH v6 01/10] rde: emacs: Start emacs in --daemon mode, with shepherd and pid-file In-Reply-To: <87jzl22u5w.fsf@gnu.org> References: <20240410234923.29319-2-ngraves@ngraves.fr> <875xwotg35.fsf@trop.in> <87zfu0m9ps.fsf@ngraves.fr> <87jzl22u5w.fsf@gnu.org> Date: Sat, 13 Apr 2024 16:20:33 +0200 Message-ID: <87frvp4a4u.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 10715470889403671221 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeiiedgjeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeefieethffggfeggfdtjeejleeuvdffheeuieekffeukeffhfetteelgeehveevgeenucffohhmrghinhepfhhrvggvuggvshhkthhophdrohhrghdpghhnuhdrohhrghenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepghhuihigqdguvghvvghlsehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=46.105.56.78; envelope-from=ngraves@ngraves.fr; helo=9.mo576.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves From: Nicolas Graves via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.88 X-Spam-Score: -6.88 X-Migadu-Queue-Id: 69C5C231C5 X-Migadu-Scanner: mx12.migadu.com X-TUID: 2G+gF87UbO4M On 2024-04-12 22:38, Ludovic Court=C3=A8s wrote: > Hi Nicolas, > > Nicolas Graves skribis: > >> As promised to Stefan a few months ago, here's a use case of >> Shepherd/Emacs implementation that we developped in RDE. > > Would be nice to have it in Guix Home! I am commited to merge RDE contributions upstream when this is possible, I will when it's mature enough / adapted for Guix ;) > >> We're using the --daemon option on the Shepherd side to launch the >> server in the background, include code in Emacs configuration to make it >> create a pid-file as soon as the server has started, and redefine >> kill-emacs to be managed by the Shepherd. > > Emacs supports systemd-style socket activation so, instead of using a > PID file, you could use =E2=80=98make-systemd-constructor=E2=80=99. > > Now, that code in emacs.c is unfortunately implemented via libsystemd > and thus disabled in Guix. Using libsystemd in this case is unnecessary > (and increases the attack surface, as we=E2=80=99ve seen with the xz back= door): > it could read the =E2=80=98LISTEN_FDS=E2=80=99 and =E2=80=98LISTEN_PID=E2= =80=99 environment variables > instead of calling the sd_* functions. > > https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.h= tml > https://www.gnu.org/software/shepherd/manual/html_node/Service-De_002d-= and-Constructors.html#index-make_002dsystemd_002dconstructor Thanks Ludo, that is precisely the feedback I was looking for. Maybe some feedback on the Emacs side about this? There are indeed very few places where systemd sd_* functions are called in emacs.c, should we try and re-implement them instead of using the library as is? Would that be a contribution Emacs devs would be interested in? That would definitely be beneficial for Emacs on Guix as highlighted by Ludo'. > > Thanks, > Ludo=E2=80=99. --=20 Best regards, Nicolas Graves