lkml.org 
[lkml]   [2004]   [Oct]   [8]   [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 Fri, Oct 08, 2004 at 08:41:04AM +0200, Willy Tarreau wrote:
    > On Wed, Oct 06, 2004 at 05:29:59PM -0700, David S. Miller wrote:
    > > It absolutely does help the programs not using select(), using
    > > blocking sockets, and not expecting -EAGAIN.
    > As I asked in a previous mail in this overly long thread, why not returning
    > zero bytes at all. It is perfectly valid to receive an UDP packet with 0
    > data bytes, and any application should be able to support this case anyway.
    > In case of TCP, this would be a problem because the app would think it
    > indicates the last byte has been received. But in case of UDP, there is no
    > problem.

    0 isn't correct either. No zero length packet was successfully received.

    I agree with the current read() behaviour. It's the select() behaviour
    that I consider to be wrong. Patching return values is just a hacky way
    of avoiding the issue.

    The issue can be more easily avoided by saying 'the Linux developers
    believe that the use of select() with blocking file descriptors is
    invalid or not recommended, and have chosen not to ensure that this
    use of system calls is reliable'. "We're not POSIX compliant in this
    case" isn't good enough for me. One acknowledges the issue. The other
    ignores it.

    Cheers,
    mark

    --
    mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
    . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
    |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
    | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

    One ring to rule them all, one ring to find them, one ring to bring them all
    and in the darkness bind them...

    http://mark.mielke.cc/

    -
    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:06    [W:0.022 / U:91.720 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site