From owner-freebsd-hackers Sun Feb 19 23:13:02 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id XAA00521 for hackers-outgoing; Sun, 19 Feb 1995 23:13:02 -0800 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id XAA00515 for ; Sun, 19 Feb 1995 23:12:59 -0800 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id XAA01650; Sun, 19 Feb 1995 23:12:42 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.9/8.6.5) with SMTP id XAA01992; Sun, 19 Feb 1995 23:12:42 -0800 Message-Id: <199502200712.XAA01992@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: Wankle Rotary Engine cc: freebsd-hackers@FreeBSD.org Subject: Re: getrlimit()/setrlimit() strangeness In-reply-to: Your message of "Mon, 20 Feb 95 01:56:03 EST." <199502200656.BAA02173@skynet.ctr.columbia.edu> From: David Greenman Reply-To: davidg@Root.COM Date: Sun, 19 Feb 1995 23:12:40 -0800 Sender: hackers-owner@FreeBSD.org Precedence: bulk >getrlimit() reported that the soft file descriptor limit was 128 (which >is correct) and that the hard limit was -1 (which is thoroughly bogus). Actually, no, it isn't. -1 is RLIM_INFINITY which is documented in the manual page. It simply means that there isn't a per-process hard limit. Since the per-process maximum limit isn't being exceeded, the setrlimit must succeed without error. The only real bug here is that the rlim_max isn't set to something like 1024. In addition, the current way that 'maxfiles' (the maximum number of open files on the system) is calculated is bogus and should be an absolute value rather than based on the maximum number of processes. -DG