Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for OrigRlimitNofile (0.27 sec)

  1. src/syscall/rlimit.go

    		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
    		// to not adjust the rlimit in the child process.
    		origRlimitNofile.Store(nil)
    	}
    	return setrlimit(resource, rlim)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:57 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. src/syscall/export_rlimit_test.go

    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package syscall
    
    import "sync/atomic"
    
    func OrigRlimitNofile() *Rlimit {
    	return origRlimitNofile.Load()
    }
    
    func GetInternalOrigRlimitNofile() *atomic.Pointer[Rlimit] {
    	return &origRlimitNofile
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:18:19 UTC 2024
    - 374 bytes
    - Viewed (0)
  3. src/syscall/syscall_linux_test.go

    	}
    
    	rlimLater := origRlimitNofile.Load()
    	if rlimLater != nil {
    		t.Fatalf("origRlimitNofile got=%v, want=nil", rlimLater)
    	}
    }
    
    func TestPrlimitOtherProcess(t *testing.T) {
    	origLimit := syscall.OrigRlimitNofile()
    	origRlimitNofile := syscall.GetInternalOrigRlimitNofile()
    
    	if origLimit == nil {
    		defer origRlimitNofile.Store(origLimit)
    		origRlimitNofile.Store(&syscall.Rlimit{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23K bytes
    - Viewed (0)
  4. src/syscall/exec_unix_test.go

    }
    
    // Test that rlimit values are restored by exec.
    func TestRlimitRestored(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") != "" {
    		fmt.Println(syscall.OrigRlimitNofile().Cur)
    		os.Exit(0)
    	}
    
    	orig := syscall.OrigRlimitNofile()
    	if orig == nil {
    		t.Skip("skipping test because rlimit not adjusted at startup")
    	}
    
    	executable, err := os.Executable()
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 04:41:27 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. src/syscall/exec_bsd.go

    	var (
    		r1              uintptr
    		err1            Errno
    		nextfd          int
    		i               int
    		pgrp            _C_int
    		cred            *Credential
    		ngroups, groups uintptr
    	)
    
    	rlim := origRlimitNofile.Load()
    
    	// guard against side effects of shuffling fds below.
    	// Make sure that nextfd is beyond any currently open files so
    	// that we can't run the risk of overwriting any of them.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 29 18:51:35 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  6. src/syscall/exec_freebsd.go

    		err1            Errno
    		nextfd          int
    		i               int
    		pgrp            _C_int
    		cred            *Credential
    		ngroups, groups uintptr
    		upid            uintptr
    	)
    
    	rlim := origRlimitNofile.Load()
    
    	// Record parent PID so child can test if it has died.
    	ppid, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
    
    	// guard against side effects of shuffling fds below.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 29 18:51:35 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  7. src/syscall/exec_libc2.go

    	var (
    		r1              uintptr
    		nextfd          int
    		i               int
    		err             error
    		pgrp            _C_int
    		cred            *Credential
    		ngroups, groups uintptr
    	)
    
    	rlim := origRlimitNofile.Load()
    
    	// guard against side effects of shuffling fds below.
    	// Make sure that nextfd is beyond any currently open files so
    	// that we can't run the risk of overwriting any of them.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 29 18:51:35 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  8. src/syscall/exec_unix.go

    	}
    	argvp, err := SlicePtrFromStrings(argv)
    	if err != nil {
    		return err
    	}
    	envvp, err := SlicePtrFromStrings(envv)
    	if err != nil {
    		return err
    	}
    	runtime_BeforeExec()
    
    	rlim := origRlimitNofile.Load()
    	if rlim != nil {
    		Setrlimit(RLIMIT_NOFILE, rlim)
    	}
    
    	var err1 error
    	if runtime.GOOS == "solaris" || runtime.GOOS == "illumos" || runtime.GOOS == "aix" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/syscall/exec_libc.go

    	var (
    		r1              uintptr
    		err1            Errno
    		nextfd          int
    		i               int
    		pgrp            _Pid_t
    		cred            *Credential
    		ngroups, groups uintptr
    	)
    
    	rlim := origRlimitNofile.Load()
    
    	// guard against side effects of shuffling fds below.
    	// Make sure that nextfd is beyond any currently open files so
    	// that we can't run the risk of overwriting any of them.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 29 18:51:35 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  10. src/syscall/exec_linux.go

    		dirfd                     int
    		cred                      *Credential
    		ngroups, groups           uintptr
    		c                         uintptr
    	)
    	pidfd = -1
    
    	rlim := origRlimitNofile.Load()
    
    	if sys.UidMappings != nil {
    		puid = []byte("/proc/self/uid_map\000")
    		uidmap = formatIDMappings(sys.UidMappings)
    	}
    
    	if sys.GidMappings != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 07:45:37 UTC 2024
    - 23K bytes
    - Viewed (0)
Back to top