summaryrefslogtreecommitdiff
path: root/buildscripts/cleanbb.py
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-06-02 13:21:29 -0400
committerEliot Horowitz <eliot@10gen.com>2010-06-02 13:21:29 -0400
commitdd276b99da24ad337cefb217aa067e0299190a26 (patch)
tree4cb6f43f9ac962a6590389a6380e44b26115179f /buildscripts/cleanbb.py
parent70cc54c5082471a1ef85a6bedf1d12c4ae986c77 (diff)
downloadmongo-dd276b99da24ad337cefb217aa067e0299190a26.tar.gz
more aggressive killing
Diffstat (limited to 'buildscripts/cleanbb.py')
-rw-r--r--buildscripts/cleanbb.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/buildscripts/cleanbb.py b/buildscripts/cleanbb.py
index 68a80127525..1afa9d47c18 100644
--- a/buildscripts/cleanbb.py
+++ b/buildscripts/cleanbb.py
@@ -4,16 +4,28 @@ import os
import utils
import time
+cwd = os.getcwd();
+if cwd.find("buildscripts" ) > 0 :
+ cwd = cwd.partition( "buildscripts" )[0]
+
+print( "cwd [" + cwd + "]" )
+
+def shouldKill( c ):
+ if c.find( cwd ) >= 0:
+ return True
+
+ if c.find( "buildbot" ) >= 0 and c.find( "/mongo/" ) >= 0:
+ return True
+
+ return False
+
def killprocs( signal="" ):
- cwd = os.getcwd();
- if cwd.find("buildscripts" ) > 0 :
- cwd = cwd.partition( "buildscripts" )[0]
killed = 0
for x in utils.getprocesslist():
x = x.lstrip()
- if x.find( cwd ) < 0:
+ if not shouldKill( x ):
continue
pid = x.partition( " " )[0]