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

Re: [PATCH] start_command: close cmd->err descriptor when fork/spawn fails

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 26, 2010, 06:29 UTC
Message-ID
<alpine.DEB.1.00.1004260828470.7651@pacific.mpi-cbg.de>
In-Reply-To
<1272244540-5960-1-git-send-email-dvornik+git@gmail.com>
Hi,
On Sun, 25 Apr 2010, bert Dvornik wrote:
Show 15 quoted lines
> Fix the problem where the cmd->err passed into start_command wasn't 
> being properly closed when certain types of errors occurr.  (Compare the 
> affected code with the clean shutdown code later in the function.)
> 
> On Windows, this problem would be triggered if mingw_spawnvpe() failed, 
> which would happen if the command to be executed was malformed (e.g. a 
> text file that didn't start with a #! line).  If cmd->err was a pipe, 
> the failure to close it could result in a hang while the other side was 
> waiting (forever) for either input or pipe close, e.g. while trying to 
> shove the output into the side band.  On msysGit, this problem was 
> causing a hang in t5516-fetch-push.
> 
> I'm not sure why (or if) this problem hasn't cropped up under Linux. The 
> non-Windows code *does* try to check for execve() failures in the child, 
> in addition to the fork() failures.
Thanks. Both patches applied and pushed to 4msysgit.git.

Ciao, Dscho

Previous: Johannes SixtNext: Johannes Sixt
Message 3 of 6 in “start_command: close cmd->err descriptor when fork/spawn fails”
  1. start_command: close cmd->err descriptor when fork/spawn failsbert Dvornik, Apr 26, 2010
  2. Johannes SixtApr 26, 2010
  3. Johannes SchindelinApr 26, 2010
  4. Johannes SixtApr 26, 2010
  5. Albert DvornikApr 26, 2010
  6. Junio C HamanoApr 26, 2010

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.