From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id mO9OKfubGWbasAAAqHPOHw:P1 (envelope-from ) for ; Fri, 12 Apr 2024 22:39:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mO9OKfubGWbasAAAqHPOHw (envelope-from ) for ; Fri, 12 Apr 2024 22:39:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=GtW1xEUM; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712954363; a=rsa-sha256; cv=none; b=RscV2qdVI5JM2NL37bAXKg6gnvEmq6N5RRn+DJG8aHrGkp3qY7YdbXdKy1wdssDbTon6qf mMRssmz1nZI2hUwpZFOEqgdWfpLBNrNPTVWXsi2CcNlZHgHEVDA8XrmKf55QA2qHg7EQHA TpAWc87n7Pdeqrhd01hWcLblJkMa6jo2GrA5oo6phDmLkiNfvsSVxtMJ/8W3p0kgw1y4gM +mFp9BdunHbjrExS7TwAfYx0wPG9KAHHRZA3z6b15HnKw7UdTHMA9y9IMcNIEjFqYhSXqF lZ+NxdPTH3/jk5zhvGdwTDoiIh4ZKUyNQk95GjiWNDVilxgZ0CroO7p0v8ZkLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=GtW1xEUM; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712954363; h=from:from:sender:sender: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:dkim-signature; bh=+lrORjTeRGUTd2jENbqcme1R3RS6o+KX+36G3tZjoD0=; b=icnVjAkTaajZ3bzECsk9+8UYwjBxSnIVGGPVGyiZiSCTgKAbAJRcU5+XzSP+RNBFRjGWfC FRa1IqZNxousALJxzWxa3Pfbh0j/shFwqu6NQCXpqD2GHd87V2Lky9XGWogUGg+w7oKkqF 3j7OQLq+EwYV9vrL9ZVd3BD7rMh1u75mA/JG2bnENABiA4luKHa70lyImdu+9E84DjLHyI xWgXxCQm71CLMbfnLNyG/HJZ8r+2bY71ov+noSTw/rellA3Db7iqg9GNCwQN8HKgFGTm7e pvQrrUiXIIiU5lkbt8vhadKJYnp7ZKRnPujrTd53ty8Rb83fjN45Ygp54JnXpw== 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 4C8CFE96B for ; Fri, 12 Apr 2024 22:39:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvNfd-0005Th-0Z; Fri, 12 Apr 2024 16:38:49 -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 1rvNfa-0005Su-Er; Fri, 12 Apr 2024 16:38:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvNfX-0004vg-Nq; Fri, 12 Apr 2024 16:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=+lrORjTeRGUTd2jENbqcme1R3RS6o+KX+36G3tZjoD0=; b=GtW1xEUMlU9GIt0820ks zNb6RnTx6LzWXit+Hhg/OCN5Xvs2vB/WiolnseEkqmFeGkmRKpW8YADY9bkHXxaVOjrwbTcpy/fJW lHt1iGusAecBg9h2HFZr00YiP6XrmNEtBjhodLuJsNPWl1aMJl7TTmjpg4MUqxMVNGw43Ggt3VGxD 4SGpJlxD4yoaW1L673U0BvprNAZkWiRV7ikGC5CGb37AVmEILv/fKPtrWmYHpWnVr2/fEHyorhPqU AK9j2iux97WcTykd8mIxdSI22xYH1AoFb2P5rO1JOU9Sg5/nhQh12lbqg10/RA5SuF4wI+jef39xF zIktsVsmy0wM4A==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Nicolas Graves via "Development of GNU Guix and the GNU System distribution." Cc: emacs-devel@gnu.org, Nicolas Graves , 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: <87zfu0m9ps.fsf@ngraves.fr> (Nicolas Graves via's message of "Thu, 11 Apr 2024 13:15:27 +0200") References: <20240410234923.29319-2-ngraves@ngraves.fr> <875xwotg35.fsf@trop.in> <87zfu0m9ps.fsf@ngraves.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 24 Germinal an 232 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de la Roquette X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 12 Apr 2024 22:38:35 +0200 Message-ID: <87jzl22u5w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , 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-Spam-Score: -10.93 X-Migadu-Queue-Id: 4C8CFE96B X-Migadu-Spam-Score: -10.93 X-Migadu-Scanner: mx10.migadu.com X-TUID: QaJxz6n0RE97 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! > 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 backdo= or): 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.html https://www.gnu.org/software/shepherd/manual/html_node/Service-De_002d-an= d-Constructors.html#index-make_002dsystemd_002dconstructor Thanks, Ludo=E2=80=99.