Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting application CORE output to zero size??

SOLVED
Go to solution
Douglas P. Van Tol, Jr.
Occasional Contributor

Setting application CORE output to zero size??

I was wondering if anyone knew have to force the size of an application core file to size zero? If I remember correctly, there is a way to have the OS cause the core file to be created with a zero size. This is NOT the SAVECORE option, which reduces the size of kernel corefiles.

For some reason, I want to say that it was a variable that could be set in either the .cshrc or equivalent startup file.

Thanks in advance,

Doug
3 REPLIES
John Palmer
Honored Contributor

Re: Setting application CORE output to zero size??

Hi,

One way is to create a zero-sized 'core' file with read-only permissions. This prevents core dumps from being written in a particular directory.

Regards,
John
Stefan Farrelly
Honored Contributor
Solution

Re: Setting application CORE output to zero size??

To completely suppress core dumps:

Bourne-style shells: "ulimit -c 0"
C-style shells: "limit coredumpsize 0"

If you want to limit dumps to a specific size, specify
a number instead of 0, in blocks for Bourne-style
shells, or kilobytes for C-style shells.

If you use a shell without specific command as per above :
In the working directory :

touch core ; chmod 000 core
Im from Palmerston North, New Zealand, but somehow ended up in London...
John Palmer
Honored Contributor

Re: Setting application CORE output to zero size??

Hi again,

The other way is to use 'ulimit -c 0'

See man sh-posix for details.

Regards,
John