From: Michal Ostrowski Date: Wed, 11 Jan 2006 21:26:52 GMT Subject: Re: [PATCH] (Updated) Exec git programs without using PATH. Message-ID: <1137014812.11717.669.camel@brick.watson.ibm.com> In-Reply-To: On Wed, 2006-01-11 at 12:42 -0800, Linus Torvalds wrote: > > On Wed, 11 Jan 2006, Junio C Hamano wrote: > > > > For your (primarily Michal, but other interested parties as > > well) reference, here is the diff between your patch in the > > message I am replying to and what I placed in the "pu" branch > > last night. > > Tangentially related note: maybe we should try to move to a "spawn()" like > interface so that it could port better to native Windows interfaces? > > Even under Linux, using vfork()+exec() is actually faster than a regular > fork/exec, so there are potential advantages. > > The real advantage of fork+exec is how you can do arbitrary setup between > the two, without needing insanely complex rules for file descriptors etc. > But maybe we don't have tons of those issues? > I briefly tried to consider if I could hide the various fork()+exec() sequences behind something like the run_command*() interfaces (which would move us down the direction of something "spawn()"-like). I found that there's a lot of variation between the various paths in terms of what happens between fork() and exec() on the various paths that does not lend itself to such consolidation. I'd love to be convinced otherwise. -- Michal Ostrowski