diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-06-02 13:21:29 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-06-02 13:21:29 -0400 |
commit | dd276b99da24ad337cefb217aa067e0299190a26 (patch) | |
tree | 4cb6f43f9ac962a6590389a6380e44b26115179f /buildscripts/cleanbb.py | |
parent | 70cc54c5082471a1ef85a6bedf1d12c4ae986c77 (diff) | |
download | mongo-dd276b99da24ad337cefb217aa067e0299190a26.tar.gz |
more aggressive killing
Diffstat (limited to 'buildscripts/cleanbb.py')
-rw-r--r-- | buildscripts/cleanbb.py | 20 |
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] |