Hi, On Sat, 10 Mar 2007, Shawn O. Pearce wrote: > Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > > On Sat, 10 Mar 2007, Shawn O. Pearce wrote: > > > > > Sometimes callers trying to use run_command to execute a child > > > process will want to setup a pipe or file descriptor to redirect > > > into the child's stdin. > > > > > > This idea is completely stolen from builtin-bundle's fork_with_pipe, > > > written by Johannes Schindelin. All credit (and blame) should lie > > > with Dscho. ;-) > > > > ;-) > > > > Thank you for starting this thread. I think it makes a lot of sense in > > the face of the MinGW port. (I am not interested in the hook stuff > > personally, so I'll not comment on that.) > > I'd like to see run_command learn how to also redirect stdout, then > replace fork_with_pipe in builtin-bundle with run_command. We should be > able to also improve some of our other more direct uses of fork to use > run_command at that point too. I concur. > I don't know squat about MinGW, so I don't know if having the > run_command abstraction really helps there or not, but I know we tried > to make it with the good intentions of being able to use it to wrap that > asinine CreateProcess() thing that Win32 has... There is only one place that I am aware of, where this is not enough: For the shallow thing, upload-pack fork()s but does not execute another program, but lists all the objects to be uploaded. (For shallow, this _cannot_ be an external process, since it mucks with the commits which are to be treated as shallow). Ciao, Dscho - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html