Subject: Re: select(0, ..) is valid ?

From: "H. Peter Anvin" <[email-masked]>
Date: Tue, 15 May 2007 10:42:55 -0700

Badari Pulavarty wrote:
> Hi,
> 
> Is select(0, ..) is a valid operation ?
> 
> I see that there is no check to prevent this or return
> success early, without doing any work. Do we need one ?
> 
> slub code is complaining that we are doing kmalloc(0).
> 

select(0, ...) is valid, and is functionally equivalent to
select(..., NULL, NULL, NULL, ...); except that any nonzero fdsets get
zeroed on return.  As such, the only thing that can interrupt it is the
timeout, or a signal.

	-hpa