KWSys: add facility to conditionally pass 'e' option (cloexec) to fopen()
clang-tidy suggests passing the 'e' option to fopen() calls: https://clang.llvm.org/extra/clang-tidy/checks/android-cloexec-fopen.html
I tried implementing that suggestion in VTK: vtk/vtk!6668 (closed)
Unfortunately, MS-Windows does not accept the 'e' option, and dies hard.
KWSys provides its Fopen() wrapper for fopen(), which VTK uses.
So I was thinking, maybe Fopen() could check for 'e' and strip it out on Windows? Or maybe it could automatically add 'e' on non-Windows? Or...
Basically, where supported, 'e' is almost what you want, but it's not portable, so need conditionalizations. VTK could always wrap KWSys's Fopen() but seems like other users of KWSys could benefit from a solution at that level.