From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 06:44:39 2025 Received: (at submit) by debbugs.gnu.org; 13 Feb 2025 11:44:39 +0000 Received: from localhost ([127.0.0.1]:41007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiXe3-0007dg-48 for submit@debbugs.gnu.org; Thu, 13 Feb 2025 06:44:39 -0500 Received: from lists.gnu.org ([2001:470:142::17]:40900) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiXe1-0007dR-1p for submit@debbugs.gnu.org; Thu, 13 Feb 2025 06:44:37 -0500 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 1tiXdv-0002l0-Fc for guix-patches@gnu.org; Thu, 13 Feb 2025 06:44:31 -0500 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 1tiXdu-0005Os-HC; Thu, 13 Feb 2025 06:44:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=gfHgOSg1uY5Vs4u7qYJtEJPgrAg9bal9UulPAu4zGio=; b=fw5NUmi/ih8x3S 5fIr0en4umuH7VZEP9LqHm7H+hyPMvx1IFpLiLDtN/HkfsA8n7r43oRm7y69bdl6ynvwYuzMBNZD9 sdQ5AFc25VkrO89W82p72lF7GVd+pCJusPN6yxEEJF8Kwa8gGXeRAh8aU8/xCzlcS/z8FFfE/DyoA XLBxfE4vV9x6labMQ2SU0FNxjur65pk/1dqdPUdbVWjC/0NEvfbyblVGeto+DF0p21fSnac0i3i8f J7KTAEi843GvTJ1AqJyYRfs1wtEaAdFplvFW+K1fPGbqDA/xXXM/Jq4uIENp/aBSMFshspvWYgJ4o JPUhi2Y4OjhXEq3ejuTQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/3] Remove uses of 'waitpid' in Shepherd services Date: Thu, 13 Feb 2025 12:43:47 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Andrew Tropin , Janneke Nieuwenhuizen , Ludovic Courtès , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On IRC, xelxebar reported an issue with the ‘transmission-daemon’ service. This patch series fixes this and related anti-patterns found in several services. Feedback welcome! Ludo’. Ludovic Courtès (3): services: transmission: Remove custom ‘stop’ implementation. services: Use ‘spawn-command’ instead of ‘fork’ + ‘waitpid’. home: services: unclutter: Add a ‘stop’ method. gnu/home/services/desktop.scm | 6 +++--- gnu/services/databases.scm | 16 +++++++++------- gnu/services/file-sharing.scm | 31 +++++-------------------------- gnu/services/networking.scm | 26 +++++++++++++------------- gnu/services/web.scm | 31 +++++++++---------------------- 5 files changed, 39 insertions(+), 71 deletions(-) base-commit: 2afb48804e4ff829ed5ed97757fde0a2cd8e39fc -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 06:46:39 2025 Received: (at 76262) by debbugs.gnu.org; 13 Feb 2025 11:46:39 +0000 Received: from localhost ([127.0.0.1]:41021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiXfy-0002OX-6x for submit@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55446) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiXfv-0002O6-U0 for 76262@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:36 -0500 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 1tiXfq-0005kY-M3; Thu, 13 Feb 2025 06:46:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=78oVrijQDwUAfTWT1y1DWGeyVtC8vnVN4PxlQORTn5E=; b=chbiaIYq3nT5kwubKbA6 /48WxbE+4iLht9Hw0KS6c1jegSloMMeForN9PCyuqG0O4qTiu5TEOK2KDD009ZlsksZ2uu689tMqw bzZkJugQ9Xcicpvgp4EOTagje8lpECLh1RXf20v7gT8IDopRvnOp86rYaOMfVCFpGNIPS6zQ2MF1z YJr5+XwTkCkNfWxghXaw+OAKSD/TBRz+cDOVw37IDIkJPD5/JGMWsPTZ17FSWP41SOVCsthZq5S1Z sp/Py63ghRekaPM8DPZG6m+u4RedzSyH5KH7uS7QTarPVjnKv4Pxr+TIewNEotVCxlJxBP177wZz7 BwwLaG99lFOo2Q==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 76262@debbugs.gnu.org Subject: [PATCH 1/3] =?UTF-8?q?services:=20transmission:=20Remove=20custom?= =?UTF-8?q?=20=E2=80=98stop=E2=80=99=20implementation.?= Date: Thu, 13 Feb 2025 12:45:46 +0100 Message-ID: <29a32c21470e99e9457c9f9258f45a84375c26ed.1739446902.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76262 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This ‘stop’ methods had two problems: 1. It is incompatible with the Shepherd 1.0, where the running value is a record and not a PID. 2. It is unreliable because its ‘waitpid’ calls compete with those made by shepherd’s main event loop upon SIGCHLD. * gnu/services/file-sharing.scm (transmission-daemon-shepherd-service): Change ‘stop’ to use ‘make-kill-destructor’. Change-Id: I406eb619d4a72bb5afe6200ac5c8f68736a78d97 --- gnu/services/file-sharing.scm | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/gnu/services/file-sharing.scm b/gnu/services/file-sharing.scm index 6b25cd420fd..4b6867bc070 100644 --- a/gnu/services/file-sharing.scm +++ b/gnu/services/file-sharing.scm @@ -648,33 +648,12 @@ (define (transmission-daemon-shepherd-service config) #:log-file #$%transmission-daemon-log-file #:environment-variables '("CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt"))) - (stop #~(lambda (pid) - (kill pid SIGTERM) - ;; Transmission Daemon normally needs some time to shut down, - ;; as it will complete some housekeeping and send a final - ;; update to trackers before it exits. - ;; - ;; Wait a reasonable period for it to stop before continuing. - ;; If we don't do this, restarting the service can fail as the - ;; new daemon process finds the old one still running and - ;; attached to the port used for peer connections. - (let wait-before-killing ((period #$stop-wait-period)) - (if (zero? (car (waitpid pid WNOHANG))) - (if (positive? period) - (begin - (sleep 1) - (wait-before-killing (- period 1))) - (begin - (format #t - #$(G_ "Wait period expired; killing \ -transmission-daemon (pid ~a).~%") - pid) - (display #$(G_ "(If you see this message \ -regularly, you may need to increase the value -of 'stop-wait-period' in the service configuration.)\n")) - (kill pid SIGKILL))))) - #f)) + ;; Transmission Daemon normally needs some time to shut down, as it will + ;; complete some housekeeping and send a final update to trackers before + ;; it exits. + (stop #~(make-kill-destructor #:grace-period #$stop-wait-period)) + (actions (list (shepherd-action -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 06:46:47 2025 Received: (at 76262) by debbugs.gnu.org; 13 Feb 2025 11:46:47 +0000 Received: from localhost ([127.0.0.1]:41025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiXg2-0002Ot-2q for submit@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55456) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiXfw-0002O8-Qg for 76262@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:38 -0500 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 1tiXfr-0005kl-JG; Thu, 13 Feb 2025 06:46:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=F4exklVjycSY8seqyGl3pAspFYWCLM0UfOCIXflezGo=; b=W6sNDh8bXm8VSreEyh0e ZufrucuRKiZMw5s/6U1KaocFPsU4RadMNg87RCd+Xc0Dj/JGPNBBONHl+X7G/2QXGT221Pk2dLUPG xnpufxMmhMv/4XwvnPvCXfjpD07d9j86/J668LEl3Tzb7EG/tVjAkRuSEiEl6c18vjTFZNfKQO0Co uYoVKI+2UohWc/3JAFC/dWV4VD4E93P0PhDvOhcR46q1XhUXj+axVVx1v7x7/Y6NE9tF9hxTL2La8 D/7PF3ftOxVdBbxTi1ch40ggG0aAQO7ETs6q9SRzujYHIxpe95iwysi0+hfkQiDSGnLsRh144KTFR Cyp5NZD+80KMkA==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 76262@debbugs.gnu.org Subject: [PATCH 2/3] =?UTF-8?q?services:=20Use=20=E2=80=98spawn-command?= =?UTF-8?q?=E2=80=99=20instead=20of=20=E2=80=98fork=E2=80=99=20+=20?= =?UTF-8?q?=E2=80=98waitpid=E2=80=99.?= Date: Thu, 13 Feb 2025 12:45:47 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76262 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is more concise and more robust: these ‘waitpid’ calls would compete with those made by shepherd’s event loop upon SIGCHLD, and they could hang forever. * gnu/services/databases.scm (postgresql-role-shepherd-service): Use ‘spawn-command’ instead of ‘fork+exec-command’ followed by ‘waitpid’. * gnu/services/networking.scm (dhcp-client-shepherd-service): Change ‘start’ to use ‘spawn-command’ instead of ‘fork+exec-command’ and * gnu/services/web.scm (patchwork-django-admin-gexp): Use ‘spawn-command’ instead of ‘primitive-fork’ + ‘waitpid’. Change-Id: I449290bfa46f8600e6ccdb5a6da990ad0cb7948c --- gnu/services/databases.scm | 16 +++++++++------- gnu/services/networking.scm | 26 +++++++++++++------------- gnu/services/web.scm | 31 +++++++++---------------------- 3 files changed, 31 insertions(+), 42 deletions(-) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index e8a4acc996d..6530c6f0a12 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson -;;; Copyright © 2015-2016, 2022-2023 Ludovic Courtès +;;; Copyright © 2015-2016, 2022-2023, 2025 Ludovic Courtès ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2018 Clément Lassieur @@ -448,12 +448,14 @@ (define (postgresql-role-shepherd-service config) (one-shot? #t) (start #~(lambda args - (let ((pid (fork+exec-command - #$(postgresql-create-roles config) - #:user "postgres" - #:group "postgres" - #:log-file #$log))) - (zero? (cdr (waitpid pid)))))) + (zero? (spawn-command + #$(postgresql-create-roles config) + #:user "postgres" + #:group "postgres" + ;; XXX: As of Shepherd 1.0.2, #:log-file is not + ;; supported. + ;; #:log-file #$log + )))) (documentation "Create PostgreSQL roles."))))) (define postgresql-role-service-type diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index af28bd0626b..53f383f6f3d 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013-2024 Ludovic Courtès +;;; Copyright © 2013-2025 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016, 2018, 2020 Efraim Flashner ;;; Copyright © 2016 John Darrington @@ -389,18 +389,18 @@ (define dhcp-client-shepherd-service '())) (false-if-exception (delete-file #$pid-file)) - (let ((pid (fork+exec-command - ;; By default dhclient uses a - ;; pre-standardization implementation of - ;; DDNS, which is incompatable with - ;; non-ISC DHCP servers; thus, pass '-I'. - ;; . - `(,dhclient "-nw" "-I" - #$(string-append "-" version) - "-pf" ,#$pid-file - ,@config-file-args - ,@ifaces)))) - (and (zero? (cdr (waitpid pid))) + (let ((status (spawn-command + ;; By default dhclient uses a + ;; pre-standardization implementation of + ;; DDNS, which is incompatable with + ;; non-ISC DHCP servers; thus, pass '-I'. + ;; . + `(,dhclient "-nw" "-I" + #$(string-append "-" version) + "-pf" ,#$pid-file + ,@config-file-args + ,@ifaces)))) + (and (zero? status) (read-pid-file #$pid-file))))) (stop #~(make-kill-destructor))))))) (package diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f5de5997acb..d42ef09c3c0 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson -;;; Copyright © 2015-2023 Ludovic Courtès +;;; Copyright © 2015-2023, 2025 Ludovic Courtès ;;; Copyright © 2016 Nikita ;;; Copyright © 2016, 2017, 2018 Julien Lepiller ;;; Copyright © 2017, 2018, 2019 Christopher Baines @@ -1902,27 +1902,14 @@ (define (patchwork-httpd-configuration patchwork-configuration) (define (patchwork-django-admin-gexp patchwork settings-module) #~(lambda command - (let ((pid (primitive-fork)) - (user (getpwnam "httpd"))) - (if (eq? pid 0) - (dynamic-wind - (const #t) - (lambda () - (setgid (passwd:gid user)) - (setuid (passwd:uid user)) - - (setenv "DJANGO_SETTINGS_MODULE" "guix.patchwork.settings") - (setenv "PYTHONPATH" #$settings-module) - (primitive-exit - (if (zero? - (apply system* - #$(file-append patchwork "/bin/patchwork-admin") - command)) - 0 - 1))) - (lambda () - (primitive-exit 1))) - (zero? (cdr (waitpid pid))))))) + (zero? (spawn-command + `(#$(file-append patchwork "/bin/patchwork-admin") + ,command) + #:user "httpd" + #:group "httpd" + #:environment-variables + `("DJANGO_SETTINGS_MODULE=guix.patchwork.settings" + ,(string-append "PYTHONPATH=" #$settings-module)))))) (define (patchwork-django-admin-action patchwork settings-module) (shepherd-action -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 06:46:48 2025 Received: (at 76262) by debbugs.gnu.org; 13 Feb 2025 11:46:48 +0000 Received: from localhost ([127.0.0.1]:41027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiXg7-0002P2-KQ for submit@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55470) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiXfy-0002OA-6T for 76262@debbugs.gnu.org; Thu, 13 Feb 2025 06:46:38 -0500 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 1tiXfs-0005l9-SN; Thu, 13 Feb 2025 06:46:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=odErYRo9CBP49mX2Tna6TNGECSoBqAkwZqfTvZvOIYc=; b=WdlGYmlcOr7y8x4/HcZE Utq/onZ0NGF1vxlr9w9jaWp8q9pPf6pvNRDT1uioxcD9zw0PWGIPTQpjZr2TfBu/Y5BwuKHxwoD4N byaEvsvP1C/c8kUnFDe5cK22cWS5YokjROjEbw2pg8aUcljfYXSAxjquStviRFf1SRjHjZge8+DC9 /cV7eiIRK0IBf/od0hySjrI/uB1rNrdVeaLbHaEO5mPPLR0su33enghJR3g4Huvw3dlNMyc1Ds69P aRJyINraTnLOSYcZDCBnMQGTlLcRTDquO1fUSt9K/g21idQpMk+N885WwqjnWRmTzv33UYuEjQ1E1 cjdchfjtqSWGkg==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 76262@debbugs.gnu.org Subject: [PATCH 3/3] =?UTF-8?q?home:=20services:=20unclutter:=20Add=20a=20?= =?UTF-8?q?=E2=80=98stop=E2=80=99=20method.?= Date: Thu, 13 Feb 2025 12:45:48 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Andrew Tropin , Janneke Nieuwenhuizen , Ludovic Courtès , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76262 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/home/services/desktop.scm (home-unclutter-shepherd-service): Remove ‘one-shot?’ field and set ‘stop’. Change-Id: I82b915d4260a62e628b419a497c50ecf2cbc356c --- gnu/home/services/desktop.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index fc96ce92954..859dba776a0 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2022-2023 Ludovic Courtès +;;; Copyright © 2022-2023, 2025 Ludovic Courtès ;;; Copyright © 2022 ( ;;; Copyright © 2023 conses ;;; Copyright © 2023 Janneke Nieuwenhuizen @@ -353,7 +353,6 @@ (define (home-unclutter-shepherd-service config) (modules '((shepherd support) ;for %user-log-dir (srfi srfi-1) (srfi srfi-26))) - (one-shot? #t) (start #~(lambda _ (fork+exec-command (list @@ -369,7 +368,8 @@ (define (home-unclutter-shepherd-service config) (remove (cut string-prefix? "DISPLAY=" <>) (default-environment-variables))) #:log-file - (string-append %user-log-dir "/unclutter.log"))))))) + (string-append %user-log-dir "/unclutter.log")))) + (stop #~(make-kill-destructor))))) (define home-unclutter-service-type (service-type -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 19 16:10:43 2025 Received: (at 76262) by debbugs.gnu.org; 19 Feb 2025 21:10:43 +0000 Received: from localhost ([127.0.0.1]:53119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tkrL9-0004gm-1P for submit@debbugs.gnu.org; Wed, 19 Feb 2025 16:10:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34272) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tkrL5-0004fy-Ei for 76262@debbugs.gnu.org; Wed, 19 Feb 2025 16:10:40 -0500 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 1tkrKz-0000T8-Fg for 76262@debbugs.gnu.org; Wed, 19 Feb 2025 16:10:33 -0500 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=qs12XFFAkJVGAsKijOlxXWBAqkHw2HLPbDROqJYNYBQ=; b=iunxOYcVv0Hf0+OHstW4 S/BOVu+t0HAXsHTyBjH/no5xCamQ0Z5aihwLt99EVlEMH6+L6qDhYnu7SeDTc89FnHa7ff3J6rg4e qIM5lQsxZLw0i4MLSJWfwXJ7FvvWhwrQvWbtCLrdfoU0y8iRHXqhMHGaPUh5q8Q849IZ4FDzhfPkU wJYCjwcoHKxPPuumK/tiFsUdWCwTT7SIcyYqpRJD3HD1osbfKx1Bog0dvFdWdXE92985JM7gkMESE parbZaBIXi3UKzZ06sIzoWaN0KUzIKzmDL3dJJEL+9D7S8jnTy7Pw4Yrh2q7apV6uYp2zZRnOwJ49 z+PzzApWoMjnDw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 76262@debbugs.gnu.org Subject: Re: [bug#76262] [PATCH 2/3] services: Use =?utf-8?Q?=E2=80=98spaw?= =?utf-8?Q?n-command=E2=80=99?= instead of =?utf-8?B?4oCYZm9ya+KAmQ==?= + =?utf-8?B?4oCYd2FpdHBpZOKAmS4=?= In-Reply-To: ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Thu, 13 Feb 2025 12:45:47 +0100") References: Date: Wed, 19 Feb 2025 22:10:29 +0100 Message-ID: <87a5ahhc8q.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76262 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > This is more concise and more robust: these =E2=80=98waitpid=E2=80=99 cal= ls would > compete with those made by shepherd=E2=80=99s event loop upon SIGCHLD, an= d they > could hang forever. > > * gnu/services/databases.scm (postgresql-role-shepherd-service): Use > =E2=80=98spawn-command=E2=80=99 instead of =E2=80=98fork+exec-command=E2= =80=99 followed by =E2=80=98waitpid=E2=80=99. > * gnu/services/networking.scm (dhcp-client-shepherd-service): Change > =E2=80=98start=E2=80=99 to use =E2=80=98spawn-command=E2=80=99 instead of= =E2=80=98fork+exec-command=E2=80=99 and > * gnu/services/web.scm (patchwork-django-admin-gexp): Use > =E2=80=98spawn-command=E2=80=99 instead of =E2=80=98primitive-fork=E2=80= =99 + =E2=80=98waitpid=E2=80=99. > > Change-Id: I449290bfa46f8600e6ccdb5a6da990ad0cb7948c Concrete manifestation of the bug with =E2=80=98dhcp-client-service-type=E2= =80=99: https://issues.guix.gnu.org/76315 Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 09:31:54 2025 Received: (at 76262-done) by debbugs.gnu.org; 21 Feb 2025 14:31:54 +0000 Received: from localhost ([127.0.0.1]:58025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlU4I-0007mF-Fr for submit@debbugs.gnu.org; Fri, 21 Feb 2025 09:31:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55538) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tlU4F-0007l6-Ak for 76262-done@debbugs.gnu.org; Fri, 21 Feb 2025 09:31:52 -0500 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 1tlU48-0001eB-U7; Fri, 21 Feb 2025 09:31:44 -0500 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=ZcJA9Zdh1/SVAOSBfmA2Fq3vEEykgeQmM9kgbB6sj8U=; b=VaQlKuoalaGZNOrk6u7E j5i4In9Sjnt40bIT2ngyfbIBrm/r1bmkwjaW3rqgxOv1ufFhzclKe/JkBchlaoP8iJL/CFkSBbzbL b25V4lGFTIjMoCebglbKF+9ktZb/D3T61tElp16yZ1/LUheTjxNW1LybXWQVqqpnMs+IKIcQACuIj hrpa7fKYqQOJiNsueb39jQimS+waXbsofExvKiWYEj0Cz/KjDOJmD/GPO6gUCf5Ibt++9oMVvH1ZF 4dzV7wCmDj5WyHEG+nTfNiyShz6QACHiHfwIbjLJNy8a5ph3UjeXko5VZKK61/JuT2JZksH9WIQhn u+EE9jVNo+F8JQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 76262-done@debbugs.gnu.org Subject: Re: [bug#76262] [PATCH 0/3] Remove uses of 'waitpid' in Shepherd services In-Reply-To: ("Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s=22's?= message of "Thu, 13 Feb 2025 12:43:47 +0100") References: Date: Fri, 21 Feb 2025 15:31:40 +0100 Message-ID: <874j0n74j7.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76262-done Cc: Janneke Nieuwenhuizen , Tanguy Le Carrour , Andrew Tropin X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > On IRC, xelxebar reported an issue with the =E2=80=98transmission-daemon= =E2=80=99 > service. This patch series fixes this and related anti-patterns > found in several services. Pushed: 90aa90eb054 origin/master home: services: unclutter: Add a =E2=80=98stop= =E2=80=99 method. e36d6ab24b7 services: Use =E2=80=98spawn-command=E2=80=99 instead of =E2= =80=98fork=E2=80=99 + =E2=80=98waitpid=E2=80=99. 9f77db78e6b services: transmission: Remove custom =E2=80=98stop=E2=80=99 = implementation. Ludo=E2=80=99. From unknown Sat Jun 21 10:38:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 22 Mar 2025 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator