delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/07/06/10:01:47

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0898C3858D39
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=dronecode.org.uk
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=jonturney AT btinternet DOT com;
bimi=skipped
X-SNCR-Rigid: 6139417C2E7786C1
X-Originating-IP: [86.139.167.41]
X-OWM-Source-IP: 86.139.167.41 (GB)
X-OWM-Env-Sender: jonturney AT btinternet DOT com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrudeifedgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeffkeeigfdujeehteduiefgjeeltdelgeelteekudetfedtffefhfeufefgueettdenucfkphepkeeirddufeelrdduieejrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddthegnpdhinhgvthepkeeirddufeelrdduieejrdeguddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheptghorhhinhhnrgdqtgihghifihhnsegthihgfihinhdrtghomhdprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
Message-ID: <ea3de3f0-ed55-bfcf-f543-a95e38b98599@dronecode.org.uk>
Date: Wed, 6 Jul 2022 15:01:23 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Subject: Re: Typo in <sys/select.h>?
To: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <DM8PR09MB70954B30D740E778EB65BA41A5819 AT DM8PR09MB7095 DOT namprd09 DOT prod DOT outlook DOT com>
<1c3256fd-ed7b-8ee3-adcd-b1d8ef2fff84 AT cornell DOT edu>
<YsU9APd87h5vUJtZ AT calimero DOT vinschen DOT de>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
In-Reply-To: <YsU9APd87h5vUJtZ@calimero.vinschen.de>
X-Spam-Status: No, score=-3570.5 required=5.0 tests=BAYES_00, FORGED_SPF_HELO,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_PASS, SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 06/07/2022 08:42, Corinna Vinschen wrote:
> On Jul  5 17:51, Ken Brown wrote:
>> On 7/5/2022 10:13 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
> 
> I guess we can change FD_SETSIZE to 1024 as on Linux, albeit this has no
> real meaning on Cygwin.  On Linux, select(2) is really only capable to
> handle file descriptors numbers up to descriptor number 1023, but Cygwin
> doesn't have this problem.  FD_SETSIZE == 64 was only something to save
> space.  The bigger FD_SETSIZE, the bigger are the default fd_sets,
> something you don't want on small targets.
> 
> So, yeah, something like
> 
>    #ifndef FD_SETSIZE
>    # ifdef __CYGWIN__
>    #  define FD_SETSIZE      1024
>    # else
>    #  define FD_SETSIZE      64
>    # endif
>    #endif

Remember that 64 is MAXIMUM_WAIT_OBJECTS for WaitForMultipleObjects(), 
the underlying Win32 API used to implement select(), so using more than 
64 hits some complex code to work around that...

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019