summaryrefslogtreecommitdiff
path: root/pkg/sysinfo/sysinfo.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sysinfo/sysinfo.go')
-rw-r--r--pkg/sysinfo/sysinfo.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sysinfo/sysinfo.go b/pkg/sysinfo/sysinfo.go
index f046de4b1..686f66ce5 100644
--- a/pkg/sysinfo/sysinfo.go
+++ b/pkg/sysinfo/sysinfo.go
@@ -142,3 +142,12 @@ func popcnt(x uint64) (n byte) {
x *= 0x0101010101010101
return byte(x >> 56)
}
+
+// GetDefaultPidsLimit returns the default pids limit to run containers with
+func GetDefaultPidsLimit() int64 {
+ sysInfo := New(true)
+ if !sysInfo.PidsLimit {
+ return 0
+ }
+ return 4096
+}