From: Jeff Law <jeffreyalaw@gmail.com>
To: Brendan Shanks <bshanks@codeweavers.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v3] libiberty: Use posix_spawn in pex-unix when available.
Date: Thu, 9 Nov 2023 21:02:56 -0700 [thread overview]
Message-ID: <7e724c45-a37a-403b-a2ae-b839d8f5b27a@gmail.com> (raw)
In-Reply-To: <20231004183004.29161-1-bshanks@codeweavers.com>
On 10/4/23 12:28, Brendan Shanks wrote:
> Hi,
>
> This patch implements pex_unix_exec_child using posix_spawn when
> available.
>
> This should especially benefit recent macOS (where vfork just calls
> fork), but should have equivalent or faster performance on all
> platforms.
> In addition, the implementation is substantially simpler than the
> vfork+exec code path.
>
> Tested on x86_64-linux.
>
> v2: Fix error handling (previously the function would be run twice in
> case of error), and don't use a macro that changes control flow.
>
> v3: Match file style for error-handling blocks, don't close
> in/out/errdes on error, and check close() for errors.
>
> libiberty/
> * configure.ac (AC_CHECK_HEADERS): Add spawn.h.
> (checkfuncs): Add posix_spawn, posix_spawnp.
> (AC_CHECK_FUNCS): Add posix_spawn, posix_spawnp.
> * configure, config.in: Rebuild.
> * pex-unix.c [HAVE_POSIX_SPAWN] (pex_unix_exec_child): New function.
Thanks. I pushed this based on Richi's ACK after fixing some minor
whitespace problems and rebuilding the generated files.
Sorry about the long delay.
jeff
next prev parent reply other threads:[~2023-11-10 4:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 18:28 Brendan Shanks
2023-11-01 18:16 ` Ping: " Brendan Shanks
2023-11-02 8:05 ` Richard Biener
2023-11-10 4:02 ` Jeff Law [this message]
2023-11-10 11:00 ` Prathamesh Kulkarni
2023-11-10 13:28 ` Richard Biener
2023-11-11 0:22 ` Patrick O'Neill
2023-11-11 17:55 ` Jeff Law
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=7e724c45-a37a-403b-a2ae-b839d8f5b27a@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=bshanks@codeweavers.com \
--cc=gcc-patches@gcc.gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).