mirror of https://github.com/status-im/consul.git
12 lines
208 B
Go
12 lines
208 B
Go
|
// +build !windows
|
||
|
|
||
|
package freeport
|
||
|
|
||
|
import "golang.org/x/sys/unix"
|
||
|
|
||
|
func systemLimit() (int, error) {
|
||
|
var limit unix.Rlimit
|
||
|
err := unix.Getrlimit(unix.RLIMIT_NOFILE, &limit)
|
||
|
return int(limit.Cur), err
|
||
|
}
|