File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -696,12 +696,11 @@ def _popen(
696696 log .debug (f"Running { role_name } (replica { replica_id } ):\n { args_pfmt } " )
697697 env = self ._get_replica_env (replica_params )
698698
699- proc = subprocess . Popen (
699+ proc = self . run_local_job (
700700 args = replica_params .args ,
701701 env = env ,
702702 stdout = stdout_ ,
703703 stderr = stderr_ ,
704- start_new_session = True ,
705704 cwd = replica_params .cwd ,
706705 )
707706 return _LocalReplica (
@@ -714,6 +713,23 @@ def _popen(
714713 error_file = env .get ("TORCHELASTIC_ERROR_FILE" , "<N/A>" ),
715714 )
716715
716+ def run_local_job (
717+ self ,
718+ args : List [str ],
719+ env : Dict [str , str ],
720+ stdout : Optional [io .FileIO ],
721+ stderr : Optional [io .FileIO ],
722+ cwd : Optional [str ] = None ,
723+ ) -> "subprocess.Popen[bytes]" :
724+ return subprocess .Popen (
725+ args = args ,
726+ env = env ,
727+ stdout = stdout ,
728+ stderr = stderr ,
729+ start_new_session = True ,
730+ cwd = cwd ,
731+ )
732+
717733 def _get_replica_output_handles (
718734 self ,
719735 replica_params : ReplicaParam ,
You can’t perform that action at this time.
0 commit comments