]> Cypherpunks repositories - gostls13.git/commit
os, syscall: move rlimit code to syscall
authorIan Lance Taylor <iant@golang.org>
Mon, 13 Mar 2023 22:20:11 +0000 (15:20 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 15 Mar 2023 17:18:32 +0000 (17:18 +0000)
commit491153a71ab2bae3fe9a586489320573448511ab
tree0c3e8633b75a36a3a16b5da370cb9c8d942f141a
parent1d06667bc40160d909897470948bb3fc6ad4da96
os, syscall: move rlimit code to syscall

In CL 393354 the os package was changed to raise the open file rlimit
at program start. That code is not inherently tied to the os package.
This CL moves it into the syscall package.

This is in preparation for future changes to restore the original
soft rlimit when exec'ing a new program.

For #46279

Change-Id: I981401b0345d017fd39fdd3dfbb58069be36c272
Reviewed-on: https://go-review.googlesource.com/c/go/+/476096
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/syscall/rlimit.go [moved from src/os/rlimit.go with 83% similarity]
src/syscall/rlimit_darwin.go [moved from src/os/rlimit_darwin.go with 79% similarity]
src/syscall/rlimit_stub.go [moved from src/os/rlimit_stub.go with 82% similarity]
src/syscall/rlimit_test.go [moved from src/os/rlimit_test.go with 91% similarity]