ei_rpc_from speedup?

Hal Snyder hal@REDACTED
Fri Aug 22 18:11:25 CEST 2003


Vance Shipley <vances@REDACTED> writes:

> File descriptors are opaque data types. You shouldn't make any
> assumptions about what values they take other than that they fit in
> an int. That file descriptors are assigned incrementally increasing
> from stdio is only a well known practice not a guarantee. I'm
> currently working with devices which start at 257 and assign
> incrementally from there.

Thanks for the reply.

But, I'm not aware of *any* OS where the following would be wrong -
such an OS would make the initial argument to select useless.


    FD_ZERO(&readmask);
    FD_SET(fd,&readmask);
    
    ... (select(fd + 1, &readmask, NULL, NULL, t) ...

Note I don't care what number fd is, whether it's 3 or 403.

Is there such a (broken?) OS - where the above does not achieve the
desired result?


BTW, FreeBSD-5.0 select man page also says:

  For historical reasons, select() will always examine the first 256
  descriptors.

Of course if we're using only the BSDs we would probably want kernel
events and not moldy old select/poll.

> On Thu, Aug 21, 2003 at 09:23:08PM -0500, Hal Snyder wrote:
> }  
> }  On FreeBSD-5.0 at least, FD_SETSIZE defaults to 1024U. Isn't the
> }  following patch an improvement (pointed out by Rick Pettit)?
> ...
> }  -    switch (select(FD_SETSIZE, &readmask, NULL, NULL, t)) {
> }  +    switch (select(fd + 1, &readmask, NULL, NULL, t)) {



More information about the erlang-questions mailing list