Skip to content

Process: On Windows do not open stdin file with write permission

Roger Leigh requested to merge rleigh/kwsys:pipe-nowrite into master

The fix in commit ed7f53e0 added GENERIC_WRITE but since we do not actually need to write to the file, only FILE_SHARE_WRITE is enough to allow others to do so. Remove the request for write permission.

Tested on Windows 10 with VS2017.

I'm not sufficiently expert with WIN32 CreateFileW flags to be 100% certain this will not have any side effects for existing users, but it looks like that should be the case.

Issue: cmake/cmake#18359 (closed)
Topic-rename: Process-stdin-file-no-write

Edited by Brad King

Merge request reports

Loading