Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: setting resource limits
- X-seq: zsh-workers 20049
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: setting resource limits
- Date: Mon, 14 Jun 2004 14:14:19 -0500
- Cc: Zsh workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <4754.1087212707@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <4754.1087212707@xxxxxxxxxxxxxxxxxxxxx>
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 <sys/resource.h> 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@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author