add error handler of unix.Setrlimit
This commit is contained in:
@@ -22,6 +22,6 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func RlimitNumFiles(maxOpenFiles uint64) {
|
||||
unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles})
|
||||
func RlimitNumFiles(maxOpenFiles uint64) error {
|
||||
return unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles})
|
||||
}
|
||||
|
Reference in New Issue
Block a user