From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8FngID351V5JGAAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 07:01:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iKSiHD351V5sYwAAbx9fmQ (envelope-from ) for ; Tue, 02 Jun 2020 07:01:17 +0000 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 BF6F9940AD0 for ; Tue, 2 Jun 2020 07:01:16 +0000 (UTC) Received: from localhost ([::1]:33210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg0vD-0001iA-DG for larch@yhetil.org; Tue, 02 Jun 2020 03:01:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg0v0-0001hy-MA for guix-patches@gnu.org; Tue, 02 Jun 2020 03:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg0v0-0008HR-CG for guix-patches@gnu.org; Tue, 02 Jun 2020 03:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jg0v0-0007Y7-Aw for guix-patches@gnu.org; Tue, 02 Jun 2020 03:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41507] [PATCH Shepherd 2/2] shepherd: Use 'signalfd' when possible. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Jun 2020 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41507 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 41507@debbugs.gnu.org Received: via spool by 41507-submit@debbugs.gnu.org id=B41507.159108123028972 (code B ref 41507); Tue, 02 Jun 2020 07:01:02 +0000 Received: (at 41507) by debbugs.gnu.org; 2 Jun 2020 07:00:30 +0000 Received: from localhost ([127.0.0.1]:37743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg0uU-0007XE-0c for submit@debbugs.gnu.org; Tue, 02 Jun 2020 03:00:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg0uT-0007Wx-1f for 41507@debbugs.gnu.org; Tue, 02 Jun 2020 03:00:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39315) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg0uN-000831-2F; Tue, 02 Jun 2020 03:00:23 -0400 Received: from [2a01:e0a:fa:a50:a896:aee9:1571:f8a1] (port=47162 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jg0uM-00015N-DE; Tue, 02 Jun 2020 03:00:22 -0400 From: Mathieu Othacehe References: <20200524143700.6378-1-ludo@gnu.org> <20200524143700.6378-2-ludo@gnu.org> <87a71ww5zx.fsf@gnu.org> <87tuzxs4gj.fsf@gnu.org> Date: Tue, 02 Jun 2020 09:00:20 +0200 In-Reply-To: <87tuzxs4gj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 30 May 2020 19:44:12 +0200") Message-ID: <87imgax88r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: YO0qvik97YFq Hey Ludo, > That way, the child is guaranteed to never execute the original > handlers, and neither the parent nor the child misses any of these > signals (previously, the temporary (sigaction SIGTERM SIG_DFL) > introduced a window during which shepherd could be killed by a SIGTERM > instead of handling it gracefully.) > > WDYT? Yes, this is indeed much better this way! > +(define %precious-signals > + ;; Signals that the shepherd process handles. > + (list SIGCHLD SIGINT SIGHUP SIGTERM)) We could maybe factorize this list with the one in "signal-port" in the "main" procedure. This way if we ever add an extra signal, we do not forget to add it to blocked signals list. Otherwise, this looks fine, thanks for taking care of that :) Mathieu