예제 #1
0
파일: cleanbb.py 프로젝트: Eric-Lu/mongo
def killprocs( signal="" ):

    killed = 0
        
    l = utils.getprocesslist()
    print( "num procs:" + str( len( l ) ) )
    if len(l) == 0:
        print( "no procs" )
        try:
            print( execsys( "/sbin/ifconfig -a" ) )
        except Exception,e:
            print( "can't get interfaces" + str( e ) )
예제 #2
0
def killprocs(signal=""):

    killed = 0

    l = utils.getprocesslist()
    print("num procs:" + str(len(l)))
    if len(l) == 0:
        print("no procs")
        try:
            print(execsys("/sbin/ifconfig -a"))
        except Exception, e:
            print("can't get interfaces" + str(e))
예제 #3
0
def killprocs( signal="", root=None ):
    killed = 0

    if sys.platform == 'win32':
        return killed

    l = utils.getprocesslist()
    print( "num procs:" + str( len( l ) ) )
    if len(l) == 0:
        print( "no procs" )
        try:
            print( execsys( "/sbin/ifconfig -a" ) )
        except Exception,e:
            print( "can't get interfaces" + str( e ) )
예제 #4
0
파일: cleanbb.py 프로젝트: ANTco/mongo
def killprocs( signal="", root=None ):
    killed = 0

    if sys.platform == 'win32':
        return killed

    l = utils.getprocesslist()
    print( "num procs:" + str( len( l ) ) )
    if len(l) == 0:
        print( "no procs" )
        try:
            print( execsys( "/sbin/ifconfig -a" ) )
        except Exception,e:
            print( "can't get interfaces" + str( e ) )
예제 #5
0
파일: cleanbb.py 프로젝트: IlyaM/mongo
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:
            continue
        
        pid = x.partition( " " )[0]
        print( "killing: " + x )
        utils.execsys( "/bin/kill " + signal + " " +  pid )
        killed = killed + 1

    return killed