From e9cebd7da58c0e5c44287ce8f75a922fa807e6f5 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Wed, 2 Nov 2016 13:48:58 -0400 Subject: [PATCH] Set pids limit when set through the CLI Signed-off-by: Mrunal Patel --- cmd/oci-runtime-tool/generate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/oci-runtime-tool/generate.go b/cmd/oci-runtime-tool/generate.go index 3509a88f9..e5f5fb31d 100644 --- a/cmd/oci-runtime-tool/generate.go +++ b/cmd/oci-runtime-tool/generate.go @@ -384,6 +384,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { g.SetLinuxResourcesCPURealtimeRuntime(context.Uint64("linux-realtime-runtime")) } + if context.IsSet("linux-pids-limit") { + g.SetLinuxResourcesPidsLimit(context.Int64("linux-pids-limit")) + } + if context.IsSet("linux-realtime-period") { g.SetLinuxResourcesCPURealtimePeriod(context.Uint64("linux-realtime-period")) }