mirror of
https://github.com/glebarez/go-sqlite.git
synced 2025-10-22 23:39:25 +08:00
freebsd/amd64: rc2
This commit is contained in:
@@ -7,4 +7,4 @@
|
|||||||
|
|
||||||
package sqlite // import "modernc.org/sqlite"
|
package sqlite // import "modernc.org/sqlite"
|
||||||
|
|
||||||
func setMaxOpenFiles(n int) error {}
|
func setMaxOpenFiles(n int) error { return nil }
|
||||||
|
@@ -8,9 +8,9 @@ import (
|
|||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setMaxOpenFiles(n int) error {
|
func setMaxOpenFiles(n int64) error {
|
||||||
var rLimit unix.Rlimit
|
var rLimit unix.Rlimit
|
||||||
rLimit.Max = 1024
|
rLimit.Max = n
|
||||||
rLimit.Cur = 1024
|
rLimit.Cur = n
|
||||||
return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit)
|
return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user