git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/8] Teach run_command how to setup a stdin pipe

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 11, 2007, 01:45 UTC
Message-ID
<20070311014533.GA10343@spearce.org>
In-Reply-To
<Pine.LNX.4.63.0703101753440.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
> 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 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...

-- 
Shawn.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 4 in “Teach run_command how to setup a stdin pipe”
  1. 5/8 Teach run_command how to setup a stdin pipeShawn O. Pearce, Mar 10, 2007
  2. Johannes SchindelinMar 10, 2007
  3. Shawn O. PearceMar 11, 2007
  4. Johannes SchindelinMar 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.