Will select(2) behavior same on NONBLOCK descriptors as BLOCKdescriptors? - Unix

This is a discussion on Will select(2) behavior same on NONBLOCK descriptors as BLOCKdescriptors? - Unix ; Hi List, I want to ask, if I add NONBLOCK flags to some of my descriptor, do I need to change old code arond select(2) calls? Particularly, to ensure connect(2) return within a few seconds, I decide to turn on ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Will select(2) behavior same on NONBLOCK descriptors as BLOCKdescriptors?

  1. Will select(2) behavior same on NONBLOCK descriptors as BLOCKdescriptors?

    Hi List,

    I want to ask, if I add NONBLOCK flags to some of my descriptor, do I
    need to change old code arond select(2) calls?

    Particularly, to ensure connect(2) return within a few seconds, I
    decide to turn on NONBLOCK option to the socket descriptor, but many
    old codes still use select(2) to check if the socket ready for read.
    Does it okay?

    Thank you.

  2. Re: Will select(2) behavior same on NONBLOCK descriptors as BLOCK descriptors?

    In article
    <7e51995c-eeba-4ad4-9f7b-5b79743206a1@j1g2000prb.googlegroups.com>,
    Steven Woody wrote:

    > Hi List,
    >
    > I want to ask, if I add NONBLOCK flags to some of my descriptor, do I
    > need to change old code arond select(2) calls?
    >
    > Particularly, to ensure connect(2) return within a few seconds, I
    > decide to turn on NONBLOCK option to the socket descriptor, but many
    > old codes still use select(2) to check if the socket ready for read.
    > Does it okay?


    Select() is normally only used when the socket is set to non-blocking.
    So if the program wasn't setting the socket to non-blocking, it could
    have had problems.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

+ Reply to Thread