Skip to content

x/sys/unix: broken FcntlInt #26078

@mikioh

Description

@mikioh

FcntlInt returns a non-nil error value regardless of the returned value from the system call.

// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
	valptr, _, err := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
	return int(valptr), err
}

See https://go-review.googlesource.com/c/sys/+/104736 for further information.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions