summaryrefslogtreecommitdiff
path: root/src/syscall/zsyscall_solaris_amd64.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-03-13 20:59:14 -0700
committerIan Lance Taylor <iant@google.com>2023-03-15 17:21:30 +0000
commitf5eef58e4381259cbd84b3f2074c79607fb5c821 (patch)
tree1405152029a813b5e8efa81c1cd10212a6eb12a0 /src/syscall/zsyscall_solaris_amd64.go
parent491153a71ab2bae3fe9a586489320573448511ab (diff)
downloadgo-git-f5eef58e4381259cbd84b3f2074c79607fb5c821.tar.gz
syscall: restore original NOFILE rlimit in child process
If we increased the NOFILE rlimit when starting the program, restore the original rlimit when forking a child process. For #46279 Change-Id: Ia5d2af9ef435e5932965c15eec2e428d2130d230 Reviewed-on: https://go-review.googlesource.com/c/go/+/476097 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/syscall/zsyscall_solaris_amd64.go')
-rw-r--r--src/syscall/zsyscall_solaris_amd64.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syscall/zsyscall_solaris_amd64.go b/src/syscall/zsyscall_solaris_amd64.go
index 19e5ec1fcd..e25db63eba 100644
--- a/src/syscall/zsyscall_solaris_amd64.go
+++ b/src/syscall/zsyscall_solaris_amd64.go
@@ -962,7 +962,7 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
+func setrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)