Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ulimit differences between zsh and bash on Linux



Hi!

> > *               soft    core            0
> > *               hard    core            32768
> > 
> > When I use bash I get this:
> > 
> > $ ulimit -Hc
> > 32768
> > 
> > But with zsh CVS I get this:
> > 
> > $ ulimit -Hc
> > 65536
> 
> I get the same results.  zsh is definitely using 512, the traditional
> block size, which as far as I know is correct.  Is bash?  If it were
> using 1024 that would explain the difference.

Yep, you guessed right. http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz has
the following in bash-3.2/builtins/ulimit.def:

static RESOURCE_LIMITS limits[] = {
#ifdef RLIMIT_CORE
  { 'c',        RLIMIT_CORE,  1024,     "core file size",      
"blocks" },
#endif

Should I report a bug against bash or has zsh to follow bash's example?
I quickly check standards at

http://www.opengroup.org/onlinepubs/000095399/functions/setrlimit.html

and it says

RLIMIT_CORE
    This is the maximum size of a core file, in bytes, that may be
created by a process.

Thanks.




      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 




Messages sorted by: Reverse Date, Date, Thread, Author