Re: ulimit error on login


Subject: Re: ulimit error on login
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Tue Sep 14 1999 - 22:37:10 MDT


Stephen Lewis wrote:

> HOWEVER - it only accepts '0' or 'unlimited'
> as arguments to the '-c' option. i.e. you can
> have EITHER unlimited core files OR no core
> files - there is no support for truncating core files,

Hi. This is not true. At least not of any bash or sh I have used recently
(including what is in the YDL distro). You can set ulimit to arbitrary
values which just means that you get a core file if its size will be less
than your limit. Otherwise you don't. Of course you can also use
unlimited/0 for anything/nothing.

I strongly suspect the problem you are having is actually due to ulimit
being called twice, with a larger size the second time. When ulimit -c yyy
is called, it sets the soft and hard limits to yyy. You can then use ulimit
-c xxx to "lower" the soft limit and ulimit -c yyy to take it back up to
the hard limit, but if you try to exceed the hard limit, you get...

bash: ulimit: cannot modify limit: Operation not permitted

For some reason, my generic install had ulimit 1000000 commented out in
/etc/profile, so maybe this problem was encountered in the past, and your
fix was the same chosen for the distribution. A ulimit -c 0 is used in the
daemon() function in /etc/rc.d/init.d/functions... maybe that was carrying
over somehow and causing the ulimit in profile to choke when it tried to
increase the limit?

I believe you also asked about a searchable archive for the list? There is.
If you go to the support page you will find a link to the archive at the
bottom of the Frequently Asked Questions section.

Jim



This archive was generated by hypermail 2a24 : Fri Oct 01 1999 - 16:13:44 MDT