Re: [PATCH v2 0/2] Use CLOEXEC to avoid fd leaks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 24, 2016, 18:23 UTC
- Message-ID
- <xmqq4m417gjf.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20161024180300.52359-1-larsxschneider@gmail.com>
larsxschneider@gmail.com writes:
> ## Changes since v1 > * add fallbacks in case O_CLOEXEC is not available
That is a good idea.
> * rename 'git_open_noatime_cloexec' to 'git_open' (Eric, Dscho)
OK. This is the old git_open_noatime() that is meant to be used ONLY for the files Git uses for its internal implementation, and never for end-user files. I think it is a good idea to open them with O_CLOEXEC.
And the separate patch to use O_CLOEXEC in ce_compare_data() that opens a working tree file for reading does not use git_open(), which is also correct. I like it.
> * rebased the topic on `next` to fix a merge conflict
I think this applies cleanly to 'master', so that is where I'd fork my copy at.
Thanks.