parallell 'source'ing files from linked directory fails randomly
Notice: whole analyze assumes tclWinFile.c from 0a2e3bb2d9 trunk.
Suppose such situation on Windows: several Tcl executable instances (in my situation it was software which integrates Tcl inside) 'source' files at the same time from the same directory, which is symbolic link or mounted drive. (in my situation mentioned software was just installed into this linked directory)
Problem is that in such situation TclpObjNormalizePath randomly fails at tclWinFile.c:2587 (exactly this line: handle = FindFirstFileW((WCHAR *) nativePath, &fData);), because at the same time other process opened the linked directory using NativeReadReparse function without FILE_SHARE_READ flag in CreateFile (see tclWinFile.c:671).
I cannot find the reason to not give shared access for reading the directory in NativeReadReparse as it only reads Reparse Point. My patch corrects this problem (it passes FILE_SHARE_READ flag into CreateFile in NativeReadReparse). Please, consider this correction, or explain the reason why it cannot be used.
990679a4a2Open linked folder shared on Windows - Patch [19ea026e43] check-in2015-04-23 12:17:537d39fa6f82Open linked folder shared on Windows - Patch [19ea026e43] check-in2015-04-23 11:21:41
Checked with Jan and APN. Test suite has no new issue, but [8f6132d6ee] was discovered.
Committed to core-8-5-branch [7d39fa6f82] and trunk [990679a4a2].
Bug closed.
Thank you, Harald