Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for adjustFileLimit (0.2 sec)

  1. src/syscall/rlimit_stub.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix && !darwin
    
    package syscall
    
    // adjustFileLimit adds per-OS limitations on the Rlimit used for RLIMIT_NOFILE. See rlimit.go.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 21:22:57 UTC 2023
    - 338 bytes
    - Viewed (0)
  2. src/syscall/rlimit_darwin.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build darwin
    
    package syscall
    
    // adjustFileLimit adds per-OS limitations on the Rlimit used for RLIMIT_NOFILE. See rlimit.go.
    func adjustFileLimit(lim *Rlimit) {
    	// On older macOS, setrlimit(RLIMIT_NOFILE, lim) with lim.Cur = infinity fails.
    	// Set to the value of kern.maxfilesperproc instead.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 15 17:18:32 UTC 2023
    - 593 bytes
    - Viewed (0)
  3. src/syscall/rlimit.go

    func init() {
    	var lim Rlimit
    	if err := Getrlimit(RLIMIT_NOFILE, &lim); err == nil && lim.Cur != lim.Max {
    		origRlimitNofile.Store(&lim)
    		nlim := lim
    		nlim.Cur = nlim.Max
    		adjustFileLimit(&nlim)
    		setrlimit(RLIMIT_NOFILE, &nlim)
    	}
    }
    
    func Setrlimit(resource int, rlim *Rlimit) error {
    	if resource == RLIMIT_NOFILE {
    		// Store nil in origRlimitNofile to tell StartProcess
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:57 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top