[EMAIL PROTECTED] wrote:

> Machine Type: i386-pc-linux-gnu
> 
> Bash Version: 2.05b
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> Hi,
> I'm trying to limit the size of coredumps using 'ulimit -c'.  Can someone 
> please explain why a core file gets generated from the coretest program 
> (source is below)?
> 
> Thanks for any help or suggestions.
> 
> Shell interaction
> % ulimit -H -c
> unlimited
> % ulimit -S -c
> 0
> % bash --version
> GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
> Copyright (C) 2002 Free Software Foundation, Inc.
> % ulimit -c 512
> % ulimit -S -c
> 512
> % ulimit -H -c
> 512
> % ./coretest 2048
> rlim_cur,rlim_max = 524288,524288
> malloced 2097152 bytes my pid is 21255
> Segmentation fault (core dumped)
> % ls -l core
> -rw-------  1 jacr swdvt 2265088 2006-10-19 14:24 core

Are you sure that's not an old core file?  My Linux testing indicates that
the coredump bit is set in the exit status, but no core file is actually
created:

$ ulimit -c 512
$ ulimit -H -c
512
$ ulimit -S -c
512
$ ls -ls core
/bin/ls: core: No such file or directory
$ ./xcore 2048
rlim_cur,rlim_max = 524288,524288
malloced 2097152 bytes my pid is 7661
Segmentation fault (core dumped)
$ ls -ls core
/bin/ls: core: No such file or directory

I get the same results with bash-2.05b and bash-3.2.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to