lkml.org 
[lkml]   [2004]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: select implementation not POSIX compliant?
    khandelw@cs.fsu.edu wrote:
    > select should work for any type of socket. Its based on the type of file
    > descriptor not whether it is stream/dgram.

    Agreed, but as Alex Riesen has shown with his test case, the behavior
    differs based on the type of socket. This doesn't seem quite right, but
    was not my original point.

    > so why should recvmsg return error???? upon closing the socket in
    other thread?
    > wouldn't the socket linger around for some time...

    Only if SO_LINGER is on, and then only for the linger time. I would
    expect recvmsg to set errno to EINTR or EINVAL indicating that the recv
    message was interrupted or is no longer valid since the socket has
    closed. This is not the case. Instead it returns 0, and doesn't set errno.

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