Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
The PR introduces the `platform.Select()` API, wrapping `select(2)` on POSIX and emulated in some cases on Windows. RATIONALE.md contains a full explanation of the approach followed in `poll_oneoff` to handle Stdin and the other types of file descriptors, and the clock subscriptions. It also introduces an abstraction (`StdioFilePoller`) to allow the simulation of different scenarios (waiting for input, input ready, timeout expired, etc.) when unit-testing interactive input. This closes #1317. Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
14 lines
382 B
Go
14 lines
382 B
Go
package platform
|
|
|
|
import (
|
|
"syscall"
|
|
_ "unsafe"
|
|
)
|
|
|
|
// syscall_syscall6 is a private symbol that we link below. We need to use this
|
|
// instead of syscall.Syscall6 because the public syscall.Syscall6 won't work
|
|
// when fn is an address.
|
|
//
|
|
//go:linkname syscall_syscall6 syscall.syscall6
|
|
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|