Tcl Source Code

Check-in [4af9ff473e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:win: closes [3f7af0e21e13f1f5] - avoid "permissions denied" by `file delete`, if file stat (TclpObjStat) used internally in other worker, for example by usage of `file mkdir` etc.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA3-256: 4af9ff473ee1a445b5d9903fb1085699d2a194d254a9fd614daaab29765de3e1
User & Date: sebres 2018-07-12 14:17:57.453
References
2018-07-12
15:36 Closed ticket [3f7af0e21e]: win: file delete could sporadic fail with "permission denied" plus 8 other changes artifact: f188c7a49a user: sebres
Context
2018-07-26
15:57
closes [d051b77fc18d7340]: fixed segfault by integer overflow (if width by format like "%4000000000g... check-in: 16846911c7 user: sebres tags: core-8-5-branch
10:47
enhanced tclsh syntax (rich command line for applications using Tcl_Main without startup-script): tr... Leaf check-in: e61a1add32 user: sebres tags: sebres-rich-cmd-line
2018-07-16
14:32
RFE [61fa4879ed] implementation - use system temp-folder as default temporary directory in the test-... Closed-Leaf check-in: 0108bf4c0e user: sebres tags: rfe-61fa4879ed
2018-07-12
14:25
merge 8.5 check-in: 6aaa943228 user: sebres tags: core-8-6-branch
14:17
win: closes [3f7af0e21e13f1f5] - avoid "permissions denied" by `file delete`, if file stat (TclpObjS... check-in: 4af9ff473e user: sebres tags: core-8-5-branch
2018-07-09
17:18
closes [270f78ca95b642fb]: fix the race condition for `file mkdir` if some worker deletes directory ... check-in: 1c12ee9e45 user: sebres tags: core-8-5-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to win/tclWinFile.c.
2089
2090
2091
2092
2093
2094
2095
2096

2097
2098
2099
2100
2101
2102
2103
     * fileHandle to read more information (nlink, ino) than we can get from
     * other attributes reading APIs. If not, then we try to fall back on the
     * 'getFileAttributesExProc', and if that isn't available, then on even
     * simpler routines.
     */

    fileHandle = (tclWinProcs->createFileProc)(nativePath, GENERIC_READ,
	    FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,

	    FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);

    if (fileHandle != INVALID_HANDLE_VALUE) {
	BY_HANDLE_FILE_INFORMATION data;

	if (GetFileInformationByHandle(fileHandle,&data) != TRUE) {
	    CloseHandle(fileHandle);







|
>







2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
     * fileHandle to read more information (nlink, ino) than we can get from
     * other attributes reading APIs. If not, then we try to fall back on the
     * 'getFileAttributesExProc', and if that isn't available, then on even
     * simpler routines.
     */

    fileHandle = (tclWinProcs->createFileProc)(nativePath, GENERIC_READ,
	    FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 
	    NULL, OPEN_EXISTING,
	    FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);

    if (fileHandle != INVALID_HANDLE_VALUE) {
	BY_HANDLE_FILE_INFORMATION data;

	if (GetFileInformationByHandle(fileHandle,&data) != TRUE) {
	    CloseHandle(fileHandle);