Merge pull request #3578 from sofat1989/containerd-stress

update the max if cur will be greater than max for setting the limit
This commit is contained in:
Phil Estes
2019-08-26 05:57:40 -07:00
committed by GitHub

View File

@@ -31,6 +31,9 @@ func setRlimit() error {
}
if limit.Cur < rlimit {
limit.Cur = rlimit
if limit.Max < limit.Cur {
limit.Max = limit.Cur
}
if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
return err
}