mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Support passing of Ulimits as -1 to mean max
Docker allows the passing of -1 to indicate the maximum limit allowed for the current process. Fixes: https://github.com/containers/podman/issues/19319 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -644,7 +644,8 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc
|
||||
for _, rlimit := range c.config.Spec.Process.Rlimits {
|
||||
if rlimit.Type == "RLIMIT_NOFILE" {
|
||||
nofileSet = true
|
||||
} else if rlimit.Type == "RLIMIT_NPROC" {
|
||||
}
|
||||
if rlimit.Type == "RLIMIT_NPROC" {
|
||||
nprocSet = true
|
||||
}
|
||||
}
|
||||
|
@ -324,6 +324,5 @@ func GetLimits(resource *spec.LinuxResources) (runcconfig.Resources, error) {
|
||||
|
||||
// Unified state
|
||||
final.Unified = resource.Unified
|
||||
|
||||
return *final, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user