mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #601 from LK4D4/fix_stats_race
Fix race between Apply and GetStats
This commit is contained in:
@@ -130,6 +130,8 @@ func (m *Manager) Apply(pid int) (err error) {
|
||||
return cgroups.EnterPid(m.Paths, pid)
|
||||
}
|
||||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
paths := make(map[string]string)
|
||||
for _, sys := range subsystems {
|
||||
if err := sys.Apply(d); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user