all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 34982@debbugs.gnu.org
Subject: [bug#34982] [PATCH] guile-build-system: Support building in parallel.
Date: Tue, 16 Apr 2019 21:30:21 +0200	[thread overview]
Message-ID: <87ftqheoj6.fsf@gnu.org> (raw)
In-Reply-To: <20190416181326.2416-1-mail@cbaines.net> (Christopher Baines's message of "Tue, 16 Apr 2019 19:13:26 +0100")

Christopher Baines <mail@cbaines.net> 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 ‘execlp’ 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., ‘execlp’ raises an exception because the executable could
not be found.)

Otherwise LGTM, thank you!

Ludo’.

  reply	other threads:[~2019-04-16 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 21:23 [bug#34982] [PATCH] guile-build-system: Support building in parallel Christopher Baines
2019-03-30 10:56 ` Ludovic Courtès
2019-04-05 23:33   ` Christopher Baines
2019-04-05 23:50   ` [bug#34982] " Christopher Baines
2019-04-16 17:06     ` Ludovic Courtès
2019-04-16 18:25       ` Christopher Baines
2019-04-16 18:13 ` Christopher Baines
2019-04-16 19:30   ` Ludovic Courtès [this message]
2019-04-19  7:43     ` bug#34982: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftqheoj6.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=34982@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.