mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
cmd/utils: comment fd utility method
This commit is contained in:
parent
067c11c7ff
commit
49f402876f
3 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue