mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-12 16:26:37 +00:00
commit
33f97d7d8f
@ -13,7 +13,7 @@ import "syscall"
|
|||||||
// MaximizeOpenFileLimit tries to set the resoure limit RLIMIT_NOFILE (number
|
// MaximizeOpenFileLimit tries to set the resoure limit RLIMIT_NOFILE (number
|
||||||
// of open file descriptors) to the max (hard limit), if the current (soft
|
// of open file descriptors) to the max (hard limit), if the current (soft
|
||||||
// limit) is below the max. Returns the new (though possibly unchanged) limit,
|
// limit) is below the max. Returns the new (though possibly unchanged) limit,
|
||||||
// or an error if it was could not be changed.
|
// or an error if it could not be changed.
|
||||||
func MaximizeOpenFileLimit() (int, error) {
|
func MaximizeOpenFileLimit() (int, error) {
|
||||||
// Get the current limit on number of open files.
|
// Get the current limit on number of open files.
|
||||||
var lim syscall.Rlimit
|
var lim syscall.Rlimit
|
||||||
|
Loading…
Reference in New Issue
Block a user