source: code/trunk/vendor/modernc.org/sqlite/rlimit.go@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 434 bytes
Line 
1// Copyright 2021 The Sqlite Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build freebsd
6// +build freebsd
7
8package sqlite // import "modernc.org/sqlite"
9
10import (
11 "golang.org/x/sys/unix"
12)
13
14func setMaxOpenFiles(n int64) error {
15 var rLimit unix.Rlimit
16 rLimit.Max = n
17 rLimit.Cur = n
18 return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit)
19}
Note: See TracBrowser for help on using the repository browser.