def is_process_running(node, name):
 command = ['pidof', '-x', name]
 d = node.run_as_root(command)
 def not_existing(failure):
  failure.trap(ProcessTerminated)
  return False
 d.addCallbacks((lambda result: True), not_existing)
 return d

def is_process_running ( node , name ) : command = [ 'pidof' , '-x' , name ] d = node . run_as_root ( command ) def not_existing ( failure ) : failure . trap ( ProcessTerminated ) return False d . addCallbacks ( ( lambda result : True ) , not_existing ) return d
returns true if a process with pid is running .