export fswatcher to a separate library

This commit is contained in:
Aine
2023-04-09 22:19:52 +03:00
parent 321060d2d6
commit e8ade4173f
135 changed files with 1212 additions and 877 deletions

View File

@@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool {
}
return true
}
// Setrlimit sets a resource limit.
func Setrlimit(resource int, rlim *Rlimit) error {
// Just call the syscall version, because as of Go 1.21
// it will affect starting a new process.
return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim))
}