def run_process(command, environ):
    """
    Run the specified process and wait until it finishes.

    Use environ dict for environment variables.
    """
    log.info('running %r with %r', command, environ)
    env = dict(os.environ)
    env.update(environ)
    try:
        p = subprocess.Popen(args=command, env=env)
    except OSError as e:
        raise OSError('cannot run %r: %s' % (command, e))
    log.debug('subprocess %d is running', p.pid)
    ret = p.wait()
    log.debug('subprocess %d exited: %d', p.pid, ret)
    return ret
def run_process ( command , environ ) : log . info ( 'running %r with %r' , command , environ ) env = dict ( os . environ ) env . update ( environ ) try : p = subprocess . Popen ( args = command , env = env ) except OSError as e : raise OSError ( 'cannot run %r: %s' % ( command , e ) ) log . debug ( 'subprocess %d is running' , p . pid ) ret = p . wait ( ) log . debug ( 'subprocess %d exited: %d' , p . pid , ret ) return ret
Run the specified process and wait until it finishes.

    Use environ dict for environment variables.