Subject: Re: reached select() limit

Re: reached select() limit

From: Leif Thuresson <leif.thuresson_at_foxt.com>
Date: Thu, 26 Jan 2017 20:15:56 +0100

Yes - Just remember you must use fcntl(, F_DUPFD, ) not dup2().
/Leif

On 2017-01-26 19:40, David Guillen Fandos wrote:
> Genious! I didn't know about that thing!
> So you just dup the fd and close the old one right?
>
> Thanks!
> David
>
> On 26/01/17 16:41, Leif Thuresson wrote:
>> Just remembered an quirk we used to do way back to over come a problem
>> with old solaris versions where the
>> stdio struct used a char for the file descriptor.
>> If you have control over the file descriptors you application is
>> creating you can push them to higher numbers with
>> newfd = fcntl(orgfd, F_DUPFD, lowlimit);
>> leaving a range of low number file descriptors free to use for c-ares.
>> Yes it's ugly, but if nothing else helps...
>>
>> /Leif
>>
>>
Received on 2017-01-26