Subject: Re: poll(2) oddity
To: <>
From: David Laight <>
List: tech-userlevel
Date: 07/08/2002 14:45:58
On Mon, Jul 08, 2002 at 02:32:15PM +0100, Ben Harris wrote:
> In article <> you write:
> >The SuS says that EINVAL should be returned if the 'nfds' argument
> >is greater than {OPEN_MAX}.
> It's not just a "should", it's a "shall".  As I understand it, this means
> it's not allowed for poll() to succeed in this case.

Interesting presumably {OPEN_MAX} could be indefinite (or maybe
maxfiles for netbsd) because a process can raise it's rlimit(NO_FILES)
value to an arbitrarily high value.

Indeed the kernel need not even enforce rlimit(NO_FILES) if it
chooses not to (eg for root).
(or did I misread the SuS pages this morning).


David Laight: