bug-make
[Top][All Lists]
Advanced

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

Re: posix_spawn() instead of fork()?


From: Paul Smith
Subject: Re: posix_spawn() instead of fork()?
Date: Wed, 14 Mar 2018 09:04:27 -0400

On Tue, 2018-03-13 at 21:47 +0100, Barath Aron wrote:
> I'd like to build projects on a system that lacks fork() and vfork() 
> support, but has posix_spawn(). Would you implement an alternate version 
> using posix_spawn() to spawn child processes?

I have looked into it before... for about 5 minutes.  As far as I know
no one is working on it.

Unfortunately it's not a simple thing.  If you start to look at the
code you'll see that make does a ton of work between the fork and the
exec.  All that needs to be revisited and reworked in order to use
posix_spawn().

On the positive side, we already have to do similar things for our
native Windows API support which doesn't provide a fork()/exec() like
behavior either.

It's an area ripe for cleanup but the amount of effort is quite
considerable.



reply via email to

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