Subject: Re: [PATCH] (Updated) Exec git programs without using PATH.

From: Andreas Ericsson <[email-masked]>
Date: Thu, 12 Jan 2006 01:11:50 +0100

Junio C Hamano wrote:
> Michal Ostrowski <[email-masked]> writes:
> 
> 
>>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.
> 
> 
> Unfortunately I am with Michal on this one (both "eh, I do not
> think that is feasible" and "I'd love to be...").
> 
> The run_command*() interfaces and its users were the best I
> could come up with as far as such consolidations could go when I
> did it.
> 

Not being entirely knowledgeable on what spawn() actually does and how 
its semantics differ from fork() and exec*() style API's (Google was 
depressingly unhelpful and wikipedia dredged up froglings...), I've got 
a decent "clone-lots-of-processes-and-multiplex-between-them" kind of 
library lying around. Would it be of any use?

 From the prototypes I've seen on spawn it doesn't seem to be much more 
than a fork() + execve(), either closing or dup2'ing all the 
file-descriptors, so I don't understand why that couldn't be implemented 
for git. Some pointers, anyone?

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231