From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 03:00:30 2020 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#41507] [PATCH Shepherd 2/2] shepherd: Use 'signalfd' when possible. 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-Debbugs-Envelope-To: 41507 Cc: 41507@debbugs.gnu.org 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 (---) 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