aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/fdlimit_windows.go
diff options
context:
space:
mode:
authorlash <nolash@users.noreply.github.com>2017-12-21 21:30:44 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-12-21 21:30:44 +0800
commit14852810b4bd53bf6e3b04e9b4017a1ee87a4003 (patch)
treed10375032226427dbcd1ae5f84a59b08cff1b94d /cmd/utils/fdlimit_windows.go
parent542d51895f54b9f869379cf4ad5549c82e525711 (diff)
downloadgo-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar.gz
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar.bz2
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar.lz
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar.xz
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.tar.zst
go-tangerine-14852810b4bd53bf6e3b04e9b4017a1ee87a4003.zip
cmd/utils: add check on fd hard limit, skip test if below target (#15684)
* cmd/utils: Add check on hard limit, skip test if below target * cmd/utils: Cross platform compatible fd limit test * cmd/utils: Remove syscall.Rlimit in test * cmd/utils: comment fd utility method
Diffstat (limited to 'cmd/utils/fdlimit_windows.go')
-rw-r--r--cmd/utils/fdlimit_windows.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/utils/fdlimit_windows.go b/cmd/utils/fdlimit_windows.go
index 53aad3d7a..f239683d2 100644
--- a/cmd/utils/fdlimit_windows.go
+++ b/cmd/utils/fdlimit_windows.go
@@ -39,3 +39,9 @@ func getFdLimit() (int, error) {
// Please see raiseFdLimit for the reason why we use hard coded 16K as the limit
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()
+}