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

Re: [PATCH] Clean up file descriptors when calling hooks.

From
Junio C Hamano <junkio@cox.net>
Date
Dec 8, 2005, 03:29 UTC
Message-ID
<7vr78omfkk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051208032428.8591.qmail@science.horizon.com>
linux@horizon.com writes:
Show 7 quoted lines
> E.g. imagine if I ran gcc -c file.c, and it assigned file.c to fd 0,
> file.h to fd1, and file.o to fd 2.   Then wants to print a warning
> message... right into the middle of the binary.  (Oversimplified
> example, because gcc is actually several separate programs, but
> hopefully you get the idea.)
>
> It's just safer to leave those fds open to a null device.

Overdangerous example. Do people realize hooks run without any locking?

Previous: linux@horizon.com
Message 2 of 2 in “Re: [PATCH] Clean up file descriptors when calling hooks.”
  1. linux@horizon.comDec 8, 2005
  2. Junio C HamanoDec 8, 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.