Esempio n. 1
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 ) )
Esempio n. 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))
Esempio n. 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 ) )
Esempio n. 4
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 ) )
Esempio n. 5
0
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