From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YAPaK1LGiWO9DwEAbAwnHQ (envelope-from ) for ; Fri, 02 Dec 2022 10:33:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EMTDK1LGiWMMLwEA9RJhRA (envelope-from ) for ; Fri, 02 Dec 2022 10:33:06 +0100 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 9C0B5DA for ; Fri, 2 Dec 2022 10:33:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p12PF-0003iZ-39; Fri, 02 Dec 2022 04:32:29 -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 1p12PD-0003iH-Fx for guix-devel@gnu.org; Fri, 02 Dec 2022 04:32:27 -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 1p12PD-0005zt-6d; Fri, 02 Dec 2022 04:32:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=naUmGEnxUgLg86MrrtqFO+aQN35qF/0tMIuI8uMAdOM=; b=W0A1sT9E87vLzy61dzJX x7eE7rMI6ZpBodvUN0SqWjZlqy3h0JJP3n28kGqEFAgfZbmGrOOb4Zg1ZptY/8hxnSlf2vpKycAcS tZ3rVWVyaWa5PkFxQQZaUYiRTDpYcAswO8dr3LXJ3fx8YUxHC8Y+T58jJFDdtiLUy5Fn8ijanC+Xi 3mwY63da0G9JJoxqZHKB9XS011bcIqP5nNouVY5bN2NNYRn7JlNjHZM+s0nbfWk/V7AfLq2z3cR/p CZX7jZg6YkskNpbo2XCsp0pWj23tzgfG5G6i7NswGfXYPtoJAgahTGS4ISySGIDLhSrdvOJBOIqIq v+BanRn26AU64Q==; Received: from [193.50.110.137] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p12P9-0000Ri-Q2; Fri, 02 Dec 2022 04:32:24 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Cc: guix-devel@gnu.org Subject: Re: branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications. References: <166969482303.24641.999754855039128907@vcs2.savannah.gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 9 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du =?utf-8?Q?Geni=C3=A8vre?= 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, 02 Dec 2022 10:32:22 +0100 In-Reply-To: <166969482303.24641.999754855039128907@vcs2.savannah.gnu.org> (guix-commits@gnu.org's message of "Mon, 28 Nov 2022 23:07:03 -0500") Message-ID: <87fsdyup5l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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-TUID: pqq7X0a1RVLv Hello, guix-commits@gnu.org skribis: > diff --git a/doc/guix.texi b/doc/guix.texi > index e547d469f4..caa6976a82 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -18940,9 +18940,8 @@ gexps to introduce job definitions that are passe= d to mcron > ;; job's action as a Scheme procedure. > #~(job '(next-hour '(3)) > (lambda () > - (execl (string-append #$findutils "/bin/updatedb") > - "updatedb" > - "--prunepaths=3D/tmp /var/tmp /gnu/store")) > + (system* (string-append #$findutils "/bin/updatedb") > + "--prunepaths=3D/tmp /var/tmp /gnu/store")) > "updatedb")) >=20=20 > (define garbage-collector-job > @@ -18980,6 +18979,12 @@ the job would appear as ``Lambda function'' in t= he output of > @command{herd schedule mcron}, which is not nearly descriptive enough! > @end quotation >=20=20 > +@quotation Tip > +Avoid calling the Guile procedures @code{execl}, @code{execle} or > +@code{execlp} inside a job specification, else mcron won't be able to > +output the completion status of the job. > +@end quotation The problem is that this creates an additional process and the first one now just sits there in =E2=80=98waitpid=E2=80=99. Could mcron return the completion status of the process that calls the thunk? It suppose it=E2=80=99s already monitoring it (via SIGCHLD or a dir= ect =E2=80=98waitpid=E2=80=99 call) so it should have that info available, no? I hope this makes sense. Ludo=E2=80=99.