[prev in list] [next in list] [prev in thread] [next in thread]
List: hurd-bug
Subject: Re: [PATCH, HURD][RFC] hurdselect: Step7x, almost complete rewrite finished
From: Pino Toscano <toscano.pino () tiscali ! it>
Date: 2013-02-12 23:23:09
Message-ID: 201302130023.09903.toscano.pino () tiscali ! it
[Download RAW message or body]
Alle mercoledì 13 febbraio 2013, Svante Signell ha scritto:
> On Wed, 2013-02-13 at 00:08 +0100, Pino Toscano wrote:
> > Alle mercoledì 13 febbraio 2013, Svante Signell ha scritto:
> > > On Tue, 2013-02-12 at 23:52 +0100, Pino Toscano wrote:
> > > > Alle martedì 12 febbraio 2013, Svante Signell ha scritto:
> > > > > * change the FD_SETSIZE upper value check to larger than or
> > > > > equal
> > > > >
> > > > > from larger than.
> > > > > (from POSIX definition of select:
> > > > > http://pubs.opengroup.org/onlinepubs/009604499/functions/sele
> > > > > ct.h tml )
> > > >
> > > > It's
> > > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/selec
> > > > t.ht ml
> > > >
> > > > actually, and it says:
> > > > |[EINVAL]
> > > > |
> > > > | The nfds argument is less than 0 or greater than
> > > > | FD_SETSIZE.
> > > >
> > > > and not "greater or equal than", so it allows FD_SETSIZE.
> > > > (And logically, if a fdset_t can contain at most FD_SETSIZE
> > > > fd's, you need to allow FD_SETSIZE as maximum number of fd's.)
> > > >
> > > > Please remove this change, which is wrong.
> > >
> > > Then you have to convince the Linux man page and the python3.2
> > > developers too. From python3.2:
> > > ./Include/fileobject.h: #define _PyIsSelectable_fd(FD) (((FD) >=
> > > 0) && ((FD) < FD_SETSIZE))
> >
> > Feel free to open bugs about them, then.
>
> On the same page you have this (and in the old link)
> The behavior of these macros is undefined if the fd argument is less
> than 0 or greater than or equal to FD_SETSIZE, or if fd is not a
> valid file descriptor, or if any of the arguments are expressions
> with side-effects.
It's referring only to "these macros", which are FD_CLR, FD_ISSET,
FD_SET, FD_ZERO, so not to select().
--
Pino Toscano
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic