From: Johannes Schindelin Date: Sat, 29 Oct 2016 08:25:03 GMT Subject: Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC Message-ID: In-Reply-To: Hi, On Fri, 28 Oct 2016, Junio C Hamano wrote: > Linus Torvalds 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 ... Correct. We cannot change an open file handle's state ("FD_CLOEXEC") on Windows, but we can ask open() to open said file handle with the correct flag ("O_CLOEXEC", which is mapped to O_NOINHERIT on Windows. And for the record: I agree with Junio that we cannot simply drop this O_CLOEXEC business. Because it was introduced to fix bugs. Thank you for your time, Johannes