Author tim.peters
Date 2006-02-06.22:19:21
SpamBayes Score
Marked as misclassified
Logged In: YES 

The problem is that there's no reason to believe anything he
did here _does_ leave files open.  I can confirm the
"permission denied" symptom, and even if I arrange for the
call to "touch" to run a touch.bat that doesn't even look at
the filename passed to it (let alone open or modify the file).

I also see a large number of errors of this sort:

Exception in thread Thread-8:
Traceback (most recent call last):
  File "C:\python24\lib\", line 442, in __bootstrap
  File "", line 21, in run
  File "", line 8, in touch
    stdin=None, stdout=subprocess.PIPE,
  File "C:\python24\lib\", line 490, in __init__
  File "C:\python24\lib\", line 398, in _cleanup
  File "C:\python24\lib\", line 739, in poll
ValueError: list.remove(x): x not in list

Those are clearly due to internals on Windows,
where the poll() and wait() methods and the module internal
_cleanup() function aren't called in mutually threadsafe
ways.  _Those_ errors can be stopped by commenting out the
_cleanup() call at the start of Popen.__init__() (think
about what happens when multiple threads call _cleanup() at
overlapping times on Windows:  all those threads can end up
trying to remove the same items from _active, but only one
thread per item can succeed).

The "permission denied" errors persist, though.

So there's at least one class of Windows bugs
here, and another class of Windows mysteries.  I believe is a red herring wrt the latter, though.  For
example, I see much the same if I use os.system() to run
`touch` instead.
Date User Action Args
2007-08-23 14:37:41adminlinkissue1425127 messages
2007-08-23 14:37:41admincreate