0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

more aggressive killing

This commit is contained in:
Eliot Horowitz 2010-06-02 13:21:29 -04:00
parent 70cc54c508
commit dd276b99da

View File

@ -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]