From owner-freebsd-current@FreeBSD.ORG Fri Nov 2 02:42:20 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 1EA7882C for ; Fri, 2 Nov 2012 02:42:20 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 892EA8FC12 for ; Fri, 2 Nov 2012 02:42:19 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so2902153lag.13 for ; Thu, 01 Nov 2012 19:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=vPKLumzkKE/KxXAc810h9wFsUPUy8XiOumnYKZS3ALc=; b=QcImANvXLa+miPcd7mUny69w1c53C09xsMhZRGUOZZU6G/ZHjWBVieMc7Bm6liL07M mlQ+j3ZLRTQnLNreeSSk1acrbqodBEgLI8ltPpJtQxdwFz9rv8byRCmuWri+4VqYuKfe mqXvgUilVwnZBs6UhsjpfXqHqfRwQIVJfZw0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=vPKLumzkKE/KxXAc810h9wFsUPUy8XiOumnYKZS3ALc=; b=gH4yJCmF9/MNgDWAa/fMRfdx8rUkAiOBWMQYi2q/RouCnHzRsI5oglOGSoeN3Pf+Dv BpQOkT8SKXP1AzvRn4i1nlghm2X71/tFeya9bH6/+vODR05ET79uAZXll3Vo3Gi9rny0 O7Ewfi8RMg01oZ4DxOxEADg0FoF62+39NqzzzHXFj/jWiopn3EIavq67hUFAa2caPqHl SsgcF/QKowMVVkLNS15w1IDIscUryMKhlUM3IeQghktpRmAjL/3ABNrYu5YJVv9C1S7N 0TCTjgv+HKiqiFC/Lrb9rhTfA+/h2RdGdVo/wt805wUiO1luvdoc25EuAPCfEY14Cyuk WNIg== Received: by 10.112.13.173 with SMTP id i13mr178622lbc.108.1351824138018; Thu, 01 Nov 2012 19:42:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.162.71 with HTTP; Thu, 1 Nov 2012 19:41:47 -0700 (PDT) In-Reply-To: <1351780831.1120.137.camel@revolution.hippie.lan> References: <1351780831.1120.137.camel@revolution.hippie.lan> From: Eitan Adler Date: Thu, 1 Nov 2012 22:41:47 -0400 Message-ID: Subject: Re: FILE's _file can only hold a short To: Ian Lepore Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkr/H9YMvNpYspHCzQXGEy0s6EEuL+omf3MJDwCzN3+YwghHHRueKhKdJ/LgyFG/b4/YYkq Cc: mdf@freebsd.org, 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: Fri, 02 Nov 2012 02:42:20 -0000 On 1 November 2012 10:40, Ian Lepore 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 ? -- Eitan Adler