From owner-freebsd-current@FreeBSD.ORG Thu Nov 1 14:40:35 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 133B6706; Thu, 1 Nov 2012 14:40:35 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id D740E8FC14; Thu, 1 Nov 2012 14:40:34 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA1EeX47046520; Thu, 1 Nov 2012 08:40:34 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qA1EeVJd007735; Thu, 1 Nov 2012 08:40:31 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: FILE's _file can only hold a short From: Ian Lepore To: mdf@freebsd.org In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Thu, 01 Nov 2012 08:40:31 -0600 Message-ID: <1351780831.1120.137.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2012 14:40:35 -0000 On Wed, 2012-10-31 at 11:12 -0700, mdf@freebsd.org wrote: > I seem to recall a thread earlier on this limitation, but looking at > actual libc/stdio sources, the 4 year old check for open(2)'s fd being > less than SHRT_MAX is still there. I thought I saw a patch to change > this to an int, but it's not in the tree. Was this in a PR or a > mailing list thread or am I just imagining things? > > We've run into this limitation at work, where some processes have > around 32k open file descriptors and then try to use the libc FILE > interface. Since we control ABI we can just change this to int, but I > had been hoping there was a FreeBSD revision we could pull instead of > having another diff. FWIW, I also remember some discussion recently (this year) on some mailing list about this, but I can't find it now. I thought it was somehow related to in-lib versus external uses of the funopen() function, but I may be conflating two unrelated discusssions in my head. -- Ian