lkml.org 
[lkml]   [2004]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: UDP recvmsg blocks after select(), 2.6 bug?
    On Sun, 17 Oct 2004 20:58:39 +0100, Martijn Sipkema <martijn@entmoot.nl> wrote:
    > >
    > > But then I am one of those who thinks it's sane to check for
    > > EWOULDBLOCK on a nonblocking socket after blocking in select().
    >
    > A POSIX comliant implementation would never do this.

    Here's your own quote, from a couple of hundred mails ago:

    > According to POSIX:

    > A descriptor shall be considered ready for reading when a call to an
    > input function with O_NONBLOCK clear would not block, whether or not
    > the function would transfer data successfully.

    You concluded from this that, if select() says a descriptor is
    readable, the subsequent recvmsg() must not block. The point is, from
    your quote I cannot deduct anything but: a recvmsg() on a descriptor
    that is readable must not block -- which makes perfect sense.

    But unless POSIX also says something about the conservability of
    "readability" of descriptors, specifically in between select() and
    recvmsg(), your conclusion is just wrong.

    > > Let's just document this and move on to something more important.
    >
    > It actually _is_ important. Just implement select() and recvmsg() as
    > described in the standard.

    I am very glad Linux makes sane decisions while trying to adhere to
    the standards as much as possible.


    Cheers,
    Buddy
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:4.482 / U:0.548 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site