mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 09:57:51 +08:00
9865e3c0c8
This fixes #612.
14 lines
408 B
Go
14 lines
408 B
Go
// +build linux
|
|
|
|
package sys
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet) error {
|
|
// On ARM64, MIPS64 and MIPS64LE, unix.Select is emulated in userland and
|
|
// will dereference timeout. In that case, we use Pselect to work around the
|
|
// problem. Bug: https://github.com/golang/go/issues/24189
|
|
_, err := unix.Pselect(nfd, r.s(), w.s(), e.s(), nil, nil)
|
|
return err
|
|
}
|