From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpy87-0005QR-DK for guix-patches@gnu.org; Thu, 07 Sep 2017 10:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpy82-0007Y1-Ok for guix-patches@gnu.org; Thu, 07 Sep 2017 10:50:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpy82-0007Xs-Ld for guix-patches@gnu.org; Thu, 07 Sep 2017 10:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dpy82-0001Lu-Eb for guix-patches@gnu.org; Thu, 07 Sep 2017 10:50:02 -0400 Subject: bug#27553: [PATCH shepherd] Register SIGCHLD handler after primitive fork Resent-To: guix-patches@gnu.org Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87a849bar1.fsf@gnu.org> <87wp77ea4g.fsf@gnu.org> Date: Thu, 07 Sep 2017 16:49:36 +0200 In-Reply-To: (Jelle Licht's message of "Thu, 7 Sep 2017 00:56:41 +0200") Message-ID: <87o9qmtvgf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Jelle Licht Cc: 27553-done@debbugs.gnu.org Heya! Jelle Licht skribis: > I just tested what Ludo' proposed, and it seems to work like a charm. > Seeing as we might be seeing more non-init shepherd instances w.r.t. > user services and the possible service extension to `guix environment', > I think it would be a good call to fix this bug :-). Indeed, thanks for the reminder. > From db942182224dfc0accad94897dd2122b128eef07 Mon Sep 17 00:00:00 2001 > From: Jelle Licht > Date: Thu, 7 Sep 2017 00:52:49 +0200 > Subject: [PATCH] Lazily register SIGCHLD hander on first call to > 'fork+exec-command'. > > * modules/shepherd.scm (main): Move unconditional top-level call to 'siga= ction' to... > * modules/shepherd/service.scm (fork+exec-command): here. Use new variabl= e. > (%sigchld-handler-installed?): New variable. LGTM, applied! Ludo=E2=80=99.