[Python-Dev] windows buildbot failures (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Mon Apr 17 10:31:40 CEST 2006


Neal Norwitz wrote:

If the patch won't fix the problem, is there something else we can do to ensure the python DLL is no longer used regardless of whether the previous test passed or not?

Rebooting the machine will help, and might be the only cure. It's Windows, after all :-(

Of course, we shouldn't do that, and even if it was ok to reboot "remotely", the buildbot likely wouldn't come back automatically.

If we can get the process handle, can we can subprocess.TerminateProcess()?

You get the process handle either from CreateProcess (which buildbot did, so we can't get the handle), or from OpenProcess. For OpenProcess, we need a process id. One way to get that is through Process32First/Process32Next. These would provide the executable path, so it should be easy to find out which one is a python_d.exe binary.

None of these functions is exposed through subprocess, so this is no option. In addition, I believe that buildbot tries to use TerminateProcess. The code is twisted, though, so it is hard to tell what actually happens.

Of course, it would be possible to do this all in VisualBasic, so we could check in a vbscript file, similar to the one in

http://support.microsoft.com/kb/q187913/

OTOH, we could just as well check in an executable that does all that, e.g. like the one in

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/enumerating_all_modules_for_a_process.asp

Regards, Martin



More information about the Python-Dev mailing list