dd20bf4862
The monitorDaemon() goroutine calls startContainerd() then blocks on <-daemonWaitCh to wait for it to exit. The startContainerd() function would (re)initialize the daemonWaitCh so a restarted containerd could be waited on. This implementation was race-free because startContainerd() would synchronously initialize the daemonWaitCh before returning. When the call to start the managed containerd process was moved into the waiter goroutine, the code to initialize the daemonWaitCh struct field was also moved into the goroutine. This introduced a race condition. Move the daemonWaitCh initialization to guarantee that it happens before the startContainerd() call returns. Signed-off-by: Cory Snider <csnider@mirantis.com> |
||
---|---|---|
.. | ||
local | ||
queue | ||
remote | ||
shimopts | ||
supervisor | ||
types | ||
libcontainerd_linux.go | ||
libcontainerd_windows.go | ||
replace.go |