Merge pull request #47314 from thaJeztah/24.0_backport_libc8d_fix_startup_data_race
[24.0 backport] libcontainerd/supervisor: fix data race
This commit is contained in:
commit
a9f4dd168e
1 changed files with 3 additions and 2 deletions
|
@ -185,12 +185,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…
Add table
Reference in a new issue