// +build !windows,!plan9

package sys

import (
	
	
)

// WaitForRead blocks until any of the given files is ready to be read or
// timeout. A negative timeout means no timeout. It returns a boolean array
// indicating which files are ready to be read and any possible error.
func ( time.Duration,  ...*os.File) ( []bool,  error) {
	 := 0
	 := NewFdSet()
	for ,  := range  {
		 := int(.Fd())
		if  <  {
			 = 
		}
		.Set()
	}
	 = Select(+1, , nil, nil, )
	 = make([]bool, len())
	for ,  := range  {
		[] = .IsSet(int(.Fd()))
	}
	return , 
}