def start_process(args, input_string='', env=None, cwd=None, stdout=None, stderr=None):
 with _popen_lock:
  logging.debug('Starting process %r with input=%r, env=%r, cwd=%r', args, input_string, env, cwd)
  p = subprocess.Popen(args, env=env, cwd=cwd, stdout=stdout, stderr=stderr, stdin=subprocess.PIPE)
  if _SUBPROCESS_STDIN_IS_THREAD_HOSTILE:
   p.stdin.write(input_string)
   p.stdin.close()
   p.stdin = None
 if (not _SUBPROCESS_STDIN_IS_THREAD_HOSTILE):
  p.stdin.write(input_string)
  p.stdin.close()
  p.stdin = None
 return p

def start_process ( args , input_string = '' , env = None , cwd = None , stdout = None , stderr = None ) : with _popen_lock : logging . debug ( 'Starting process %r with input=%r, env=%r, cwd=%r' , args , input_string , env , cwd ) p = subprocess . Popen ( args , env = env , cwd = cwd , stdout = stdout , stderr = stderr , stdin = subprocess . PIPE ) if _SUBPROCESS_STDIN_IS_THREAD_HOSTILE : p . stdin . write ( input_string ) p . stdin . close ( ) p . stdin = None if ( not _SUBPROCESS_STDIN_IS_THREAD_HOSTILE ) : p . stdin . write ( input_string ) p . stdin . close ( ) p . stdin = None return p
start a supervisor process .