From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2574 invoked from network); 14 Jun 2004 19:15:56 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 14 Jun 2004 19:15:56 -0000 Received: (qmail 1398 invoked from network); 14 Jun 2004 19:14:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Jun 2004 19:14:59 -0000 Received: (qmail 11158 invoked by alias); 14 Jun 2004 19:14:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20049 Received: (qmail 11109 invoked from network); 14 Jun 2004 19:14:46 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 14 Jun 2004 19:14:43 -0000 Received: (qmail 32589 invoked from network); 14 Jun 2004 19:14:25 -0000 Received: from dan.emsphone.com (root@199.67.51.101) by a.mx.sunsite.dk with SMTP; 14 Jun 2004 19:14:23 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i5EJEKoR001030; Mon, 14 Jun 2004 14:14:20 -0500 (CDT) (envelope-from dan) Date: Mon, 14 Jun 2004 14:14:19 -0500 From: Dan Nelson To: Oliver Kiddle Cc: Zsh workers Subject: Re: setting resource limits Message-ID: <20040614191419.GF62945@dan.emsphone.com> References: <4754.1087212707@trentino.logica.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4754.1087212707@trentino.logica.co.uk> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 In the last episode (Jun 14), Oliver Kiddle said: > Have a look at these two messages on the Linux kernel mailing list. > You'll want to scroll to the end of the first one. > http://www.ussg.iu.edu/hypermail/linux/kernel/0404.1/1509.html > http://www.ussg.iu.edu/hypermail/linux/kernel/0404.2/1037.html > > Basically, the suggestion is that it should be possible to set resource > limits numerically with e.g. `ulimit 4 1024'. I can see how this could > be worth a lot to anyone implementing a new resource limit. Is that > difficult to implement? Would it be vaguely portable? I doubt it. That's what and RLIMIT_xxx is for. The first 5 limits (0-4) happen to be the same across all the following systems, but RLIMIT_NOFILE is different: AIX: #define RLIMIT_NOFILE 7 FreeBSD: #define RLIMIT_NOFILE 8 /* number of open files */ Linux: RLIMIT_NOFILE = 7, Solaris: #define RLIMIT_NOFILE 5 /* file descriptors */ Tru64: #define RLIMIT_NOFILE 6 /* open files */ -- Dan Nelson dnelson@allantgroup.com