setrlimit (ulimit) bug? Cannot ulimit -c!

setrlimit (ulimit) bug? Cannot ulimit -c!

Post by Jan Wielemak » Fri, 30 Oct 1998 04:00:00



Hi,

I just noticed that after a ulimit -c 0 (bash), it is no longer possible
to *raise* the limit as a normal user. Kernel 2.0.35 (SuSE 5.3). Tcsh
exhibits the same behaviour, so I guess it's the kernel denying the
request.

The setrlimit() manpage talks about hard and soft-limits, but doesn't
elaborate.  Does ulimit -c 0 incorrectly set the hard limit?

It's a bit uncomfortable if you have ulimit -c 0 in ~/.bashrc and
incidentally want a core because you get infrequent crashes on some
application ...

        Regards --- Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jan Wielemaker                Author of SWI-Prolog and the XPCE GUI library
SWI, University of Amsterdam  http://www.swi.psy.uva.nl/usr/jan/SWI-Prolog.html

 
 
 

setrlimit (ulimit) bug? Cannot ulimit -c!

Post by Andreas Jaege » Fri, 30 Oct 1998 04:00:00


Quote:>>>>> Jan Wielemaker writes:

 > Hi,
 > I just noticed that after a ulimit -c 0 (bash), it is no longer possible
 > to *raise* the limit as a normal user. Kernel 2.0.35 (SuSE 5.3). Tcsh
 > exhibits the same behaviour, so I guess it's the kernel denying the
 > request.
Read the man page of bash.  You can either set only the hard or only
the soft limit if you use -S/-H but if supply neither both limits are
set.

 > The setrlimit() manpage talks about hard and soft-limits, but doesn't
 > elaborate.  Does ulimit -c 0 incorrectly set the hard limit?
It sets as documented both hard and softlimit.
 > It's a bit uncomfortable if you have ulimit -c 0 in ~/.bashrc and
 > incidentally want a core because you get infrequent crashes on some
 > application ...
Try ulimit -S -c 0

Andreas
--