Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2012 12:09:38 -0700
From:      mdf@FreeBSD.org
To:        Eitan Adler <lists@eitanadler.com>
Cc:        Ian Lepore <freebsd@damnhippie.dyndns.org>, freebsd-current@freebsd.org
Subject:   Re: FILE's _file can only hold a short
Message-ID:  <CAMBSHm8Hf5mi36dsa%2BYJwgjkxHe-Pxs6K2OCa=VkbWdxSERbQA@mail.gmail.com>
In-Reply-To: <CAF6rxgkdsfDJ0m%2BMTZYn0dBSVGb9jCYCUo3Q9FhT3dEvYJZGJQ@mail.gmail.com>
References:  <CAMBSHm_-5JUGX5nGyOLjMxpQjnh=7%2B5NkPnP1-i0OjSEKe7D6Q@mail.gmail.com> <1351780831.1120.137.camel@revolution.hippie.lan> <CAF6rxgkdsfDJ0m%2BMTZYn0dBSVGb9jCYCUo3Q9FhT3dEvYJZGJQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 1, 2012 at 7:41 PM, Eitan Adler <lists@eitanadler.com> wrote:
> On 1 November 2012 10:40, Ian Lepore <freebsd@damnhippie.dyndns.org> wrote:
>> 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.
>
> Perhaps http://freebsd.1045724.n5.nabble.com/stdio-and-short-file-descriptors-revisited-td5747703.html
> ?

Yes, that was it exactly.  Thanks!  My (quick) search had not been fruitful.

Thanks,
matthew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm8Hf5mi36dsa%2BYJwgjkxHe-Pxs6K2OCa=VkbWdxSERbQA>