1
This commit is contained in:
@@ -148,6 +148,11 @@ func (r *subprocessRunner) Start(ctx context.Context, job *TrainingJob) (int, er
|
||||
}
|
||||
return 0, gerror.Wrap(err, "启动训练进程失败")
|
||||
}
|
||||
// 子进程 Start 时已 dup 该 fd,父进程立即释放——exec.Cmd.Wait 只关内部创建的
|
||||
// pipe、不关外部设置的 *os.File,不关则每次训练任务泄漏一个常开句柄
|
||||
if out != nil {
|
||||
_ = out.Close()
|
||||
}
|
||||
r.mu.Lock()
|
||||
if r.cmds == nil {
|
||||
r.cmds = map[int64]*exec.Cmd{}
|
||||
|
||||
Reference in New Issue
Block a user