• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FD_SETSIZE > 1024 and select() break on intel ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FD_SETSIZE > 1024 and select() break on intel ?


  • Subject: Re: FD_SETSIZE > 1024 and select() break on intel ?
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 12 Feb 2009 09:06:56 -0800

On Thu, Feb 12, 2009 at 9:02 AM, Shawn Erickson <email@hidden> wrote:
> On Thu, Feb 12, 2009 at 7:08 AM, Nicolas Berloquin <email@hidden> wrote:
>>> Sounds like you should read up on FD_SETSIZE in man select:
>>>
>>>> The behavior of these macros is undefined if a descriptor value is less
>>>> than zero or greater than or equal to
>>>> FD_SETSIZE
>>
>> yes, but it works/worked fine when compiled in PPC !!!
>
> You may have found an edge case but it doesn't mean what you are doing
> is expected to work.
>
>> Actually some versions of select() are defined to accept values > FD_SETSIZE
>> as long as you take
>> care to allocate the memory yourself.
>> and it's not specifically described in the universal app guide...
>
> From the man page (10.5 system)...
>
> COMPATIBILITY
>     select() now returns with errno set to EINVAL when nfds is
> greater than FD_SETSIZE.  Use a smaller
>     value for nfds or compile with -D_DARWIN_UNLIMITED_SELECT.

Sorry clicked send instead of save...

I meant to point out that this came about as a result of getting Mac
OS X UNIX certified. Review the following to understand what changed
and how to restore "legacy" (aka non-conforming) behavior if you
really need it...

http://developer.apple.com/ReleaseNotes/Darwin/SymbolVariantsRelNotes/index.html

-Shawn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >FD_SETSIZE > 1024 and select() break on intel ? (From: Nicolas Berloquin <email@hidden>)
 >Re: FD_SETSIZE > 1024 and select() break on intel ? (From: Frederick Cheung <email@hidden>)
 >Re: FD_SETSIZE > 1024 and select() break on intel ? (From: Nicolas Berloquin <email@hidden>)
 >Re: FD_SETSIZE > 1024 and select() break on intel ? (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: FD_SETSIZE > 1024 and select() break on intel ?
  • Next by Date: Re: Does CFSocket use efficient polling?
  • Previous by thread: Re: FD_SETSIZE > 1024 and select() break on intel ?
  • Next by thread: Re: FD_SETSIZE > 1024 and select() break on intel ? (case closed)
  • Index(es):
    • Date
    • Thread