mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00

build a podman-remote binary for windows that allows users to use the remote client on windows and interact with podman on linux system. Signed-off-by: baude <bbaude@redhat.com>
21 lines
543 B
Go
21 lines
543 B
Go
// +build linux darwin
|
|
|
|
package parse
|
|
|
|
import (
|
|
"fmt"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func getDefaultProcessLimits() []string {
|
|
rlim := unix.Rlimit{Cur: 1048576, Max: 1048576}
|
|
defaultLimits := []string{}
|
|
if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
|
defaultLimits = append(defaultLimits, fmt.Sprintf("nofile=%d:%d", rlim.Cur, rlim.Max))
|
|
}
|
|
if err := unix.Setrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
|
defaultLimits = append(defaultLimits, fmt.Sprintf("nproc=%d:%d", rlim.Cur, rlim.Max))
|
|
}
|
|
return defaultLimits
|
|
}
|