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

Re: [PATCH 1/2] git_mkstemps: correctly test return value of open()

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2013, 20:54 UTC
Message-ID
<CAPc5daVVDCHqjyDV3zYVV33EFYjea7ge84+CE=M=QXagxnHd-A@mail.gmail.com>
In-Reply-To
<201307182032.r6IKWtWC016218@freeze.ariadne.com>
On Thu, Jul 18, 2013 at 1:32 PM, Dale R. Worley <worley@alum.mit.edu> wrote:
Show 7 quoted lines
> I've been looking into writing a proper test for this patch.  My first
> attempt tests the symptom that was seen initially, that "git commit"
> fails if fd 0 is closed.
>
> One problem is how to arrange for fd 0 to be closed.  I could use the
> bash redirection "<&-", but I think you want to be more portable than
> that.
That's just a plain-vanilla part of POSIX shell behaviour, no?
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_05
Previous: Eric SunshineNext: Dale R. Worley
Message 10 of 16 in “open() error checking”
  1. 0/2 open() error checkingThomas Rast, Jul 12, 2013
  2. 1/2 git_mkstemps: correctly test return value of open()Thomas Rast, Jul 12, 2013
  3. Thomas RastJul 16, 2013
  4. Junio C HamanoJul 17, 2013
  5. Drew NorthupJul 18, 2013
  6. Junio C HamanoJul 18, 2013
  7. Junio C HamanoJul 18, 2013
  8. Dale R. WorleyJul 18, 2013
  9. Eric SunshineJul 18, 2013
  10. Junio C HamanoJul 18, 2013
  11. Dale R. WorleyJul 18, 2013
  12. Junio C HamanoJul 18, 2013
  13. Dale R. WorleyJul 18, 2013
  14. 2/2 run-command: dup_devnull(): guard against syscalls failingThomas Rast, Jul 12, 2013
  15. Junio C HamanoJul 12, 2013
  16. Thomas RastJul 16, 2013

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.