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:
499 bytes
|
Rev | Line | |
---|
[822] | 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 linux || darwin || netbsd || openbsd
|
---|
| 6 | // +build linux darwin netbsd openbsd
|
---|
| 7 |
|
---|
| 8 | package sqlite // import "modernc.org/sqlite"
|
---|
| 9 |
|
---|
| 10 | import (
|
---|
| 11 | "golang.org/x/sys/unix"
|
---|
| 12 | )
|
---|
| 13 |
|
---|
| 14 | func setMaxOpenFiles(n int64) error {
|
---|
| 15 | var rLimit unix.Rlimit
|
---|
| 16 | rLimit.Max = uint64(n)
|
---|
| 17 | rLimit.Cur = uint64(n)
|
---|
| 18 | return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit)
|
---|
| 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.