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:
Sebastiaan van Stijn 2024-02-03 14:37:57 +01:00 committed by GitHub
commit 341a7978a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")