github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/elvish/sys/select_linux.go (about)

     1  // +build linux
     2  
     3  package sys
     4  
     5  import "golang.org/x/sys/unix"
     6  
     7  func Select(nfd int, r *FdSet, w *FdSet, e *FdSet) error {
     8  	// On ARM64, MIPS64 and MIPS64LE, unix.Select is emulated in userland and
     9  	// will dereference timeout. In that case, we use Pselect to work around the
    10  	// problem. Bug: https://github.com/golang/go/issues/24189
    11  	_, err := unix.Pselect(nfd, r.s(), w.s(), e.s(), nil, nil)
    12  	return err
    13  }