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

Re: [PATCH] copy_fd: close ifd on error

From
Junio C Hamano <junkio@cox.net>
Date
Dec 27, 2005, 09:02 UTC
Message-ID
<7vpsnic3pq.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051227081905.GA9946@mars.ravnborg.org>
Sam Ravnborg <sam@ravnborg.org> writes:
Show 7 quoted lines
> In copy_fd when write fails we ought to close input file descriptor.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>
> Found while looking at the source for inspiration for something else.
> I did not see any error related to this.

Thanks. I think the only place this matters is git-local-fetch which nobody uses these days where it can leak handful ifd. All other users immediately exit upon seeing failure return from the function.

Of course this would matter much when we do libification.
Previous: Sam Ravnborg
Message 2 of 2 in “copy_fd: close ifd on error”
  1. copy_fd: close ifd on errorSam Ravnborg, Dec 27, 2005
  2. Junio C HamanoDec 27, 2005

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.