Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
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