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

Re: [PATCH] setup.c: remove needless argument passed to open in sanitize_stdfds

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 26, 2018, 04:39 UTC
Message-ID
<xmqqmupwzc47.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181125162008.30065-1-pedrodelyra@gmail.com>
pedrodelyra@gmail.com writes:
> According to POSIX manual pages, the open() system call's mode
> argument specifies the file mode bits to be applied when a new
> file is created. If neither O_CREAT nor O_TMPFILE is specified,
> then mode is ignored.
Correct.  

While I would say two argument form would have been better if this were a new code, this change is borderline Meh for existing code, because passing 0 there already gives a reasonable sign that we know this parameter does not matter.

If the ignored parameter were 0666 or some other more plausible-as-perm-bits value, the story would be quite different, though.

Thanks.
Previous: pedrodelyra@gmail.com
Message 2 of 2 in “setup.c: remove needless argument passed to open in sanitize_stdfds”
  1. setup.c: remove needless argument passed to open in sanitize_stdfdspedrodelyra@gmail.com, Nov 25, 2018
  2. Junio C HamanoNov 26, 2018

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.