gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

rlimit.go (434B)


      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 
      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 = n
     17 	rLimit.Cur = n
     18 	return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit)
     19 }