Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 29, 2016, 01:26 UTC
- Message-ID
- <xmqqr370vtba.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CA+55aFwUEzfvWVSZfhBi85QaKWSo-gVMOk1BJFrR0ZsdCRHRsg@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Apparently windows doesn't even support it, at least not mingw....
Assuming that the above was a misunderstanding, assuming that we can do O_CLOEXEC (but not FD_CLOEXEC) on Windows just fine, where stray file descriptors held open in the children matter more, and ...
> In contrast, O_NOATIME isn't a maintenance problem, since it's purely > an optimization and has no semantic difference, so it not existing on > some platform is immaterial.
... assuming that I didn't screw up my use of fcntl() to set O_NOATIME on a fd opened with O_CLOEXEC, are you OK with the approach in patch *1*? We can drop *2* to keep O_NOATIME, which has been working for those with old kernels with many loose objects, and it is not too much code to keep.
*1* http://public-inbox.org/git/xmqqh97w38gj.fsf@gitster.mtv.corp.google.com *2* http://public-inbox.org/git/xmqqd1ik38f4.fsf@gitster.mtv.corp.google.com