Garrett Wollman wrote:
>
> <
>said:
>
> > As from OpenBSD (in shorter form):
>
> > fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask));
>
> But this is not portable. The application is not allowed to assume
> anything about the structure of an fd_set, or the existence of a ty
< said:
> As from OpenBSD (in shorter form):
> fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask));
But this is not portable. The application is not allowed to assume
anything about the structure of an fd_set, or the existence of a type
`fd_mask', or the existence of a macro `h
As from OpenBSD (in shorter form):
fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask));
FD_SET(fd, fds);
select(fd+1, fds...);
As for being "portable", the only thing I've seen that is nice and neat is
libevent from Niels Provos, but I think some people had "is
On Mon, Nov 26, 2001 at 03:04:56PM -0500, Andrew R. Reiter wrote:
> Agreed, or people could code with select in a nice manner and dynamically
> allocate the fd_set arrays.
Is there a portable way to allocate dynamically sized fd_sets? It
could easily be one of those things that you're not suppose
Agreed, or people could code with select in a nice manner and dynamically
allocate the fd_set arrays.
On Mon, 26 Nov 2001, Garrett Wollman wrote:
:< said:
:
:> For what it's worth, it also makes code less portable.
:
:On the other hand, it would also make libfetch useful in a larger
:variety of
< said:
> For what it's worth, it also makes code less portable.
On the other hand, it would also make libfetch useful in a larger
variety of applications; viz., those which have so many file
descriptors open that the one used by libfetch will overflow the
default fd_set.
-GAWollman
To Unsubs
Dag-Erling Smorgrav wrote:
>
> David Hill <[EMAIL PROTECTED]> writes:
> > This patch converts libfetch to use kqueue instead of select.
>
> Why? It reduces neither the size nor the complexity of the code, and
> does not result in any notable performance improvements.
For what it's worth, it al
David Hill <[EMAIL PROTECTED]> writes:
> This patch converts libfetch to use kqueue instead of select.
Why? It reduces neither the size nor the complexity of the code, and
does not result in any notable performance improvements.
DES
--
Dag-Erling Smorgrav - [EMAIL PROTECTED]
To Unsubscribe: s