Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-12-03
16:53 • Closed ticket [2380318fff]: file tempfile loops on Windows plus 4 other ch... artifact: 7ca373746e user: dkf
16:53 • Ticket [2380318fff]: 4 changes artifact: 6ac655431c user: dkf
00:10 • New ticket [2380318fff]. artifact: b47334c38f user: ferrieux

[file tempfile] loops on Windows

Closed / Fixed2380318fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-12-03 00:10:36
The recent (TIP210 impl) TclpOpenTemporaryFile function, in Windows, enters an infinite loop filling %TEMP% with empty TCLxxx.tmp files.

This can be tracked down to the function calling *both*  tclWinProcs->getTempFileNameProc and tclWinProcs->createFileProc, ignoring the fact that the first one already creates the file.

The bottom line is that the function loops forever with  GetLastError() == ERROR_FILE_EXISTS.
 
Donal, I'm sure you can fix this in no time ;-)

(this is prio 9 because the test suite cannot be run without disabling the [file tempfile]s everywhere)
dkfplain2008-12-03 16:53:21
Ugh! I hate these interactions between parts of the Win API.

Fixed. We now avoid GetTempFileName for [file tempfile] since it has a race condition...
dkf Closed ticket [2380318fff]. [History diff]2008-12-03 16:53:22
Log in (anonymous is fine) to add a comment.