use posix_spawn in pexecute

DJ Delorie dj@redhat.com
Tue Mar 12 17:25:00 GMT 2002


> On Tue, Mar 12, 2002 at 07:03:45PM -0300, Alexandre Oliva wrote
> > 
> > OTOH, there are platforms on which an efficient implementation of
> > fork+exec is hopeless.  AFAIK, Windows is one such platform, and it
> > probably is one the platforms with the widest user base of GCC.  So,
> > why not accommodate OSs in which using spawn is actually a win?
> 
> Windows already has its own version of pexecute() that does use spawn
> (not the same spawn as the one Roland's patch used).

I think his point is that the purpose of pexecute() is to let each OS
decide for itself what the most efficient and/or practical way of
performing that function is.  It is not up to us to decide a
platform's implementation of pexecute(), but up to the platform
maintainer.  Requiring platforms to implement fork/exec is already
futile (djgpp simply can't do it), so using posix_* functions would
not set a new precedent.



More information about the Gcc-patches mailing list