go/src/internal/poll
Tobias Klauser bbd25d26c0 internal/poll: use correct fcntl implementations
Use the libc fcntl (via syscall.fcntl) on aix and solaris like it is
already done for darwin.

For the syscall-based fcntl implementation use FcntlSyscall from
internal/syscall/unix in order to get fcntl64 on 32-bit Linux
systems.

On aix, fcntl with F_DUPFD_CLOEXEC is not supported. Thus, defined
F_DUPFD_CLOEXEC = 0 in the syscall package and check its value before
calling fcntl(fd, syscall.F_DUPFD_CLOEXEC, 0).

On js/wasm, fcntl is not supported thus let its implementation return
ENOSYS directly.

Updates #36211

Change-Id: I96a2ea79e5c4eed2fefd94d0aefd72c940825682
Reviewed-on: https://go-review.googlesource.com/c/go/+/212278
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-12-31 12:11:24 +00:00
..
errno_unix.go
errno_windows.go
error_linux_test.go runtime, internal/poll, net: report event scanning error on read event 2019-03-13 08:53:02 +00:00
error_stub_test.go runtime, internal/poll, net: report event scanning error on read event 2019-03-13 08:53:02 +00:00
error_test.go runtime, internal/poll: report only critical event scanning error 2019-03-19 08:30:50 +00:00
export_posix_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
export_test.go
export_windows_test.go
fcntl_js.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fcntl_libc.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fcntl_syscall.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fd.go all: remove os.ErrTimeout 2019-08-02 17:57:18 +00:00
fd_fsync_darwin.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fd_fsync_posix.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fd_fsync_windows.go
fd_io_plan9.go
fd_mutex.go
fd_mutex_test.go
fd_opendir_darwin.go syscall: avoid _getdirentries64 on darwin 2019-04-03 21:27:05 +00:00
fd_plan9.go
fd_poll_js.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
fd_poll_runtime.go runtime, internal/poll, net: report event scanning error on read event 2019-03-13 08:53:02 +00:00
fd_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
fd_posix_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
fd_unix.go internal/poll: use correct fcntl implementations 2019-12-31 12:11:24 +00:00
fd_windows.go all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
fd_windows_test.go
fd_writev_darwin.go
fd_writev_unix.go
hook_cloexec.go
hook_unix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
hook_windows.go
read_test.go runtime, internal/poll: report only critical event scanning error 2019-03-19 08:30:50 +00:00
sendfile_bsd.go
sendfile_linux.go
sendfile_solaris.go
sendfile_windows.go internal/poll: make SendFile work with large files on Windows 2019-09-26 06:16:42 +00:00
sock_cloexec.go
sockopt.go
sockopt_linux.go
sockopt_unix.go
sockopt_windows.go
sockoptip.go
splice_linux.go internal/poll: use fcntl64 on 32-bit GNU/Linux systems 2019-12-26 13:53:31 +00:00
strconv.go
sys_cloexec.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
writev.go internal/poll: avoid memory leak in Writev 2019-05-20 01:53:24 +00:00
writev_test.go