From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:52131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHQge-0006uj-U4 for guix-patches@gnu.org; Fri, 19 Apr 2019 06:24:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHQgd-0005xZ-Uq for guix-patches@gnu.org; Fri, 19 Apr 2019 06:24:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHQgd-0005xM-Rf for guix-patches@gnu.org; Fri, 19 Apr 2019 06:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHQgd-000166-MA for guix-patches@gnu.org; Fri, 19 Apr 2019 06:24:03 -0400 Subject: bug#34982: [PATCH] guile-build-system: Support building in parallel. Resent-To: guix-patches@gnu.org Resent-Message-ID: References: <20190324212345.4697-1-mail@cbaines.net> <20190416181326.2416-1-mail@cbaines.net> <87ftqheoj6.fsf@gnu.org> From: Christopher Baines In-reply-to: <87ftqheoj6.fsf@gnu.org> Date: Fri, 19 Apr 2019 08:43:39 +0100 Message-ID: <87y346tp78.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 34982-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> * guix/build/guile-build-system.scm (build): Use invoke-each, instead of >> for-each, to use multiple cores if available. >> (invoke-each, report-build-process): New procedures. > > [...] > >> + (define (fork-and-run-command command) >> + (match (primitive-fork) >> + (0 >> + (apply execlp command)) >> + (pid >> + #t))) > > To be on the safe side, you should probably wrap the =E2=80=98execlp=E2= =80=99 call like > this: > > (dynamic-wind > (const #t) > (lambda () > (apply execlp command)) > (lambda () > (primitive-exit 127))) > > This ensures that the child process exits immediately if something goes > wrong (e.g., =E2=80=98execlp=E2=80=99 raises an exception because the exe= cutable could > not be found.) > > Otherwise LGTM, thank you! Great, I've added in dynamic-wind, made some minor tweaks to the output, and pushed this as 3fdb9a375f1cee7dd302349a9527437df20b3f61. Thanks for taking a look :) Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAly5fCtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdZgBAAr/arAGXex8vefpWbUZQZ6eraG2JM67NdvoiEu8yX1FR5OmiENDpIrwxT XLBAv/ypZZ90ZGnOcFbTVQTiPX57Z/V+RWJI7/N1MlbbPo0OoJexeGOJ6b5MJuOf mieDHYfJiLYbLWCBAxkqQK1WC1w3W0z6tstZ0ToZZ9mNAwNfBG9oJsVxZdtBnMaw N/qhCRVna90VrzLkdVqRFsdzjY5DB6Rcv6228tGFsGpm8zVkVux95OLi+TD1Deas bhPCAZr6vXM5ebimHXtWc9vTbPLQhDf95ke6gY96F1yeHUBc9i67xhDIrJXMslWh 5E92c0n8RJoqeDcOkGqnd27o347ktFabkDlwtkvYC9l7DsrmrB3gb980oFR5RTY0 uYuw5+1WSoX83Sf0iDbAffcUFfxOoLvnLCyLe486bHogX/14AbvW+nCB8aaBblxw S+IR2dsND9cuWM/+INzmO3XEpqo9Jl8kJSSv+8VautG8T+NMs92TzZ5kUmaN3gLo WCzZGbax4oJaQ5nGefx1tU6vbh0tm7j77MYIhNFUK4F3GT1OLGh4GvhyW5smH+fO 4zbUmrDRJbyN4LjQHMh8v2s0m0xzZ4MUvxnz/Lof/g9TrvQULomzj9wIu3D43aap ldSfLSO8quD7vO+RPfozByE8yfpvBW53wupGuqvaLJ+K8A26XEY= =Jmg/ -----END PGP SIGNATURE----- --=-=-=--