def _kill_process(p, errors):
 try:
  printlog(('[%s] killing on exit' % p.name))
  p.stop(errors)
 except Exception as e:
  printerrlog(('Exception: %s' % str(e)))

def _kill_process ( p , errors ) : try : printlog ( ( '[%s] killing on exit' % p . name ) ) p . stop ( errors ) except Exception as e : printerrlog ( ( 'Exception: %s' % str ( e ) ) )
routine for kill process p with appropriate logging to screen and logfile .