Thread (1 message) 1 message, 1 author, 2018-11-26

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

From: Junio C Hamano <hidden>
Date: 2018-11-26 04:39:14

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help