From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31951 invoked by alias); 25 Sep 2013 06:49:35 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 31936 invoked by uid 89); 25 Sep 2013 06:49:35 -0000 Received: from mail.lysator.liu.se (HELO mail.lysator.liu.se) (130.236.254.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 25 Sep 2013 06:49:35 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: mail.lysator.liu.se Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id A9E3240007 for ; Wed, 25 Sep 2013 08:49:30 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 88D8340003 for ; Wed, 25 Sep 2013 08:49:30 +0200 (CEST) Message-ID: <52428776.2000305@lysator.liu.se> Date: Wed, 25 Sep 2013 07:42:00 -0000 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: [PATCH] tests: don't assume getdtablesize () <= 10000000 References: <517EF2F1.2030802@cs.ucla.edu> <5241DBE6.4000007@redhat.com> <20130925043225.GB1192@ednor.casa.cgf.cx> In-Reply-To: <20130925043225.GB1192@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00363.txt.bz2 On 2013-09-25 06:32, Christopher Faylor wrote: > On Tue, Sep 24, 2013 at 12:37:26PM -0600, Eric Blake wrote: >> This patch causes failures on at least test-fcntl and test-dup2 on >> cygwin (both 32-bit and 64-bit); there, getdtablesize() currently >> returns the current runtime value, but this value starts at 256, and >> automatically expands as needed at runtime up to 3200. I think cygwin >> should be patched to make getdtablesize() return a constant 3200 (rather >> than the current runtime value); > > Why? What does "3200" have to do with anything? There is not supposed > to be a hard-coded upper limit. Go back and read the gdb session. STC in C: #include #include #include int main(void) { int ret = dup2(0, 3200); if (ret == -1) printf("3200 errno %d: %s\n", errno, strerror(errno)); else printf("3200 ok"); ret = dup2(0, 3199); if (ret == -1) printf("3199 errno %d: %s\n", errno, strerror(errno)); else printf("3199 ok"); return 0; } output on my system: 3200 errno 9: Bad file descriptor 3199 ok -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple