Tcl Source Code

View Ticket
Login
Ticket UUID: 2380318
Title: [file tempfile] loops on Windows
Type: Bug Created on: 2008-12-03 00:10:36
Submitter: ferrieux Assigned to: dkf
Subsystem: 37. File System Severity:
Priority: 9 Immediate Last modified: 2008-12-03 16:53:22
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2008-12-03 09:53:22
Version: obsolete: 8.6a4
Description:
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)
User Comments:
dkf added on 2008-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...