From owner-freebsd-current@FreeBSD.ORG Wed Oct 31 18:12:56 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 7BD5FC3D for ; Wed, 31 Oct 2012 18:12:56 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 500C68FC0A for ; Wed, 31 Oct 2012 18:12:56 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so1239051pad.13 for ; Wed, 31 Oct 2012 11:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=cxJQexqjRF5F8xq7bUF6F1Jw6RfslWvgVL1FRV/En/M=; b=VVINLe2XCfCiXtFHrtZFRfcXr9BIBek5cX2cA2aUhJ7bAz2o3iCRJViksc3uV6jwob A67Rn/MglNXrZUyBh9bYjrA7XuwGll/3Bu/H7BO+SaQQcas+vxFXuu0nCphCCeqbe57E rdtFuCDJ2aSdYFUFCoFYX3QRzWfFIZMetNb1dyl61Kymx9BjZjCahljxWNJuDA1U4G1g kZepO/sqo7fl+YDTKYaZv0k9VRcL8Zjl1q47B8gjqQMEGN4d37YhtYmLsgpxuSdQlHqf v9GbMCl8dPolCK4Iju7tximNzCFC7vgVkfOgEtNVqXwH/JnYJfVS3CwnzNMQgD1fXtTI GO+w== MIME-Version: 1.0 Received: by 10.66.85.233 with SMTP id k9mr103492060paz.73.1351707175881; Wed, 31 Oct 2012 11:12:55 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.223.105 with HTTP; Wed, 31 Oct 2012 11:12:55 -0700 (PDT) Date: Wed, 31 Oct 2012 11:12:55 -0700 X-Google-Sender-Auth: e0a_UrUkj54DHMkL_aA-eMrNwTQ Message-ID: Subject: FILE's _file can only hold a short From: mdf@FreeBSD.org To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 31 Oct 2012 18:12:56 -0000 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. Thanks, matthew