cmd/utils: comment fd utility method

This commit is contained in:
Péter Szilágyi 2017-12-21 14:21:43 +02:00
parent 067c11c7ff
commit 49f402876f
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
3 changed files with 6 additions and 0 deletions

View file

@ -53,6 +53,8 @@ func getFdLimit() (int, error) {
return int(limit.Cur), nil
}
// getFdMaxLimit retrieves the maximum number of file descriptors this process is
// allowed to request for itself.
func getFdMaxLimit() (int, error) {
var limit syscall.Rlimit
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {

View file

@ -49,6 +49,8 @@ func getFdLimit() (int, error) {
return int(limit.Cur), nil
}
// getFdMaxLimit retrieves the maximum number of file descriptors this process is
// allowed to request for itself.
func getFdMaxLimit() (int, error) {
var limit syscall.Rlimit
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {

View file

@ -40,6 +40,8 @@ func getFdLimit() (int, error) {
return 16384, nil
}
// getFdMaxLimit retrieves the maximum number of file descriptors this process is
// allowed to request for itself.
func getFdMaxLimit() (int, error) {
return getFdLimit()
}