Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 7c37910

Browse files
committed
Document the fix for FreeBSD.
1 parent cdbd92d commit 7c37910

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/fds.go

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ func getFDLimit() (uint64, error) {
1414
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit); err != nil {
1515
return 0, err
1616
}
17+
// rlimit.Cur's type is platform-dependent, so here we widen it as far as Go
18+
// will allow by converting it to a uint64.
1719
return uint64(rlimit.Cur), nil
1820
}
1921

0 commit comments

Comments
 (0)