Merge pull request #47313 from thaJeztah/25.0_backport_libc8d_fix_startup_data_race
[25.0 backport] libcontainerd/supervisor: fix data race
This commit is contained in:
commit
341a7978a5
1 changed files with 3 additions and 2 deletions
|
@ -190,12 +190,13 @@ func (r *remote) startContainerd() error {
|
|||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
err := cmd.Start()
|
||||
startedCh <- err
|
||||
if err != nil {
|
||||
startedCh <- err
|
||||
return
|
||||
}
|
||||
|
||||
r.daemonWaitCh = make(chan struct{})
|
||||
startedCh <- nil
|
||||
|
||||
// Reap our child when needed
|
||||
if err := cmd.Wait(); err != nil {
|
||||
r.logger.WithError(err).Errorf("containerd did not exit successfully")
|
||||
|
|
Loading…
Reference in a new issue