bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posix_spawn (or vfork) support?


From: Chet Ramey
Subject: Re: posix_spawn (or vfork) support?
Date: Fri, 16 Jun 2023 16:34:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/15/23 8:32 PM, Sam James wrote:
Hi,

Sorry if this has come up before - I did take a look and couldn't find
anything.

Could bash use posix_spawn/vfork instead of the rather heavyweight
fork?

I haven't looked at them. Bash does more work between fork and exec than
the posix_spawn implementations I've looked at can manage, so it's not a
real win. I've never looked at vfork because there are a lot of assumptions
baked into the code that the child has its own copies of variables and
other data.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]