d91d01565d
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
15 lines
294 B
Go
15 lines
294 B
Go
// +build !windows
|
|
|
|
package main
|
|
|
|
import "syscall"
|
|
|
|
// Flimit defines the max number of watched files
|
|
func (s *Settings) flimit() error {
|
|
var rLimit syscall.Rlimit
|
|
rLimit.Max = uint64(s.FileLimit)
|
|
rLimit.Cur = uint64(s.FileLimit)
|
|
|
|
return syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
|
}
|