Skip to content

Commit

Permalink
syscall: rm go:linkname from origRlimitNofile
Browse files Browse the repository at this point in the history
Since CL 588076 runc can do fine without the kludge. The code accessing the symbol is now guarded with `go:build !go1.23` in all supported runc branches (main: [1], release-1.1: [2]).

This reverts part of CL 587219.

Updates #67401.

For #66797.

[1]: opencontainers/runc#4290
[2]: opencontainers/runc#4299

Change-Id: I204843a93c36857e21ab9b43bd7aaf046e8b9787
Reviewed-on: https://go-review.googlesource.com/c/go/+/587918
Auto-Submit: Ian Lance Taylor <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
kolyshkin authored and gopherbot committed Jun 7, 2024
1 parent 5532427 commit 532cf27
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/syscall/rlimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,9 @@ package syscall

import (
"sync/atomic"
_ "unsafe"
)

// origRlimitNofile, if non-nil, is the original soft RLIMIT_NOFILE.
//
// origRlimitNofile should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/opencontainers/runc
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname origRlimitNofile
var origRlimitNofile atomic.Pointer[Rlimit]

// Some systems set an artificially low soft limit on open file count, for compatibility
Expand Down

0 comments on commit 532cf27

Please sign in to comment.