diff --git a/checkin_notes b/checkin_notes index d01f4d8627..bc74819159 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13479,3 +13479,10 @@ Rom 13 June 2004 setup_project.py sched/ start + +Karl 2004-06-14 + - 'start': simplified remote fork/exec logic, and added option for + parallel/sequential delegation to remote hosts (default sequential) + + sched/ + start diff --git a/sched/start b/sched/start index 7db6b764bb..7f03110042 100755 --- a/sched/start +++ b/sched/start @@ -88,6 +88,7 @@ ignore_timestamps = False prune_run_state = True # is_main_host = False local_hostname = '' +delegate_other_hosts_in_parallel = False def get_host_list(): ''' @@ -696,18 +697,20 @@ apply(command) run_state.write() if is_main_host: + if delegate_other_hosts_in_parallel: + wait_mode = os.P_NOWAIT + else: + wait_mode = os.P_WAIT + other_hosts = get_host_list() for host in other_hosts: if host == local_hostname: continue local_cmd = ' '.join(sys.argv) - remote_cmd = 'ssh '+host+' "cd '+cwd+';'+local_cmd + remote_cmd = [ 'ssh', host, 'cd', cwd, ' && ' ] + sys.argv if verbose: - remote_cmd += " -v" - remote_cmd += '"' - print 'running ', remote_cmd - pid = os.fork() - if pid == 0: - os.execl('/bin/sh', 'sh', '-c', remote_cmd) + remote_cmd += [ '-v' ] + print 'running ', ' '.join(remote_cmd) + os.spawnvp(wait_mode, remote_cmd[0], remote_cmd) os.unlink(start_lockfile)