Skip to content

Commit

Permalink
For Windows, add delay after killing BuildLogger job object
Browse files Browse the repository at this point in the history
The new way of killing mongod.exe for smokeJs apparently doesn't
wait for all child processes to exit, so cleanbb.py would fail to
delete files: "WindowsError: [Error 32] The process cannot access
the file because it is being used by another process:".  Sleep for
5 seconds after terminating the job object to let the processes die.
  • Loading branch information
Tad Marshall committed Jul 16, 2012
1 parent 3e54e4c commit 1abe1c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buildscripts/smoke.py
Expand Up @@ -246,6 +246,9 @@ def stop(self):
if os.sys.platform == "win32": if os.sys.platform == "win32":
import win32job import win32job
win32job.TerminateJobObject(self.job_object, -1) win32job.TerminateJobObject(self.job_object, -1)
import time
# Windows doesn't seem to kill the process immediately, so give it some time to die
time.sleep(5)
else: else:
# This function not available in Python 2.5 # This function not available in Python 2.5
self.proc.terminate() self.proc.terminate()
Expand Down

0 comments on commit 1abe1c5

Please sign in to comment.