mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Bump github.com/opencontainers/runc from 1.2.5 to 1.2.6
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/opencontainers/runc/releases) - [Changelog](https://github.com/opencontainers/runc/blob/v1.2.6/CHANGELOG.md) - [Commits](https://github.com/opencontainers/runc/compare/v1.2.5...v1.2.6) --- updated-dependencies: - dependency-name: github.com/opencontainers/runc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
22
vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go
generated
vendored
22
vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go
generated
vendored
@@ -42,9 +42,20 @@ func RecvFile(socket *os.File) (_ *os.File, Err error) {
|
||||
oob := make([]byte, oobSpace)
|
||||
|
||||
sockfd := socket.Fd()
|
||||
n, oobn, _, _, err := unix.Recvmsg(int(sockfd), name, oob, unix.MSG_CMSG_CLOEXEC)
|
||||
var (
|
||||
n, oobn int
|
||||
err error
|
||||
)
|
||||
|
||||
for {
|
||||
n, oobn, _, _, err = unix.Recvmsg(int(sockfd), name, oob, unix.MSG_CMSG_CLOEXEC)
|
||||
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, os.NewSyscallError("recvmsg", err)
|
||||
}
|
||||
if n >= MaxNameLen || oobn != oobSpace {
|
||||
return nil, fmt.Errorf("recvfile: incorrect number of bytes read (n=%d oobn=%d)", n, oobn)
|
||||
@@ -115,5 +126,10 @@ func SendFile(socket *os.File, file *os.File) error {
|
||||
// SendRawFd sends a specific file descriptor over the given AF_UNIX socket.
|
||||
func SendRawFd(socket *os.File, msg string, fd uintptr) error {
|
||||
oob := unix.UnixRights(int(fd))
|
||||
return unix.Sendmsg(int(socket.Fd()), []byte(msg), oob, nil, 0)
|
||||
for {
|
||||
err := unix.Sendmsg(int(socket.Fd()), []byte(msg), oob, nil, 0)
|
||||
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
|
||||
return os.NewSyscallError("sendmsg", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user