Re: Question on select() and sockets
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Mon, 9 Jun 2008 03:40:30 -0700 (PDT)
On Jun 7, 2:29 am, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
Independently of this, this particular implementation happens to be
Linux and the consense among the people who wrote it (again
simplified) is that it does violate the standard, but that the
standardized behaviours isn't really useful in situations where a lot
of UDP-datagrams are expected to arrive and need to be processed in
realtime, eg any type of video- and/ or audio-streaming. With the
present implementation, the received datagram can be checksummed while
it is being copied into a userspace buffer, which cuts the necessary
memory accesses to do all of it by one third[*]. Which I consider to
be a valid argument.
The standard does not prohibit a UDP datagram from being dropped after
it triggers a 'select' hit and before that program manages to call
'recvmsg'. Any program that has problems with the Linux behavior must
already have a TOCTTOU race.
I do not believe it is possible for this behavior to break a program
that is already broken.
DS
.
- Follow-Ups:
- Re: Question on select() and sockets
- From: Rick Jones
- Re: Question on select() and sockets
- From: Rainer Weikusat
- Re: Question on select() and sockets
- References:
- Question on select() and sockets
- From: K-mart Cashier
- Re: Question on select() and sockets
- From: Alex Fraser
- Re: Question on select() and sockets
- From: K-mart Cashier
- Re: Question on select() and sockets
- From: William Ahern
- Re: Question on select() and sockets
- From: Alex Fraser
- Re: Question on select() and sockets
- From: Rainer Weikusat
- Question on select() and sockets
- Prev by Date: Re: Signals question
- Next by Date: Re: Question on select() and sockets
- Previous by thread: Re: Question on select() and sockets
- Next by thread: Re: Question on select() and sockets
- Index(es):
Relevant Pages
|