RE: select for UNIX sockets?

David Schwartz (davids@webmaster.com)
Wed, 11 Jun 2003 15:50:55 -0700


> Jesse Pollard <jesse@cats-chateau.net> writes:

> > As in: ALWAYS ready to write as soon as a connection is made. It can
> > still block on a write if the amount to write is larger than the buffer
> > available. Nothing is said about the AMOUNT that can be written
> > (though with most FIFOs/pipes the limit is ~ 4K, though not guaranteed
> > since other writers may fill it between the poll and the write.

> Still, it is local (UNIX) datagram socket and thus the number of
> datagrams is the limit, not the number of bytes. And yes, the problem
> is present with 1-byte datagrams. And still, the problem is with select()
> and not with send*().

Can you find me where any standard says that local UNIX datagrams can't
have lengths of less than one byte? It's really this simple -- you don't
have the guarantee you think you have. Yes, the kernel could be nicer. But
what you're trying to do (foist on the kernel the job of transmit scheduling
on a connectionless socket) is fundamentally wrong.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/