implement run_process synchronously