When running a user program, you might see a message that alerts you to a condition and then announces "core dumped." A program that contains a bug in it might never fail, might stomp on good data, might generate faulty results, or might result in a core dump. It all depends on the nature of the bug in the program. When the message "core dumped" is displayed, you will usually find a file called core in the directory from which the program was executed. This file contains information about the program, allowing the programmer to debug the program and locate the source of trouble. To anyone but the programmer, core files are generally not of interest and just eat up disk space. C shell users can use the limit command to prevent core files from being left behind, as shown below. Figure 1-2 Limiting the core dump file size in the C shellHiya 3: limit cputime unlimited filesize unlimited datasize 2097148 kbytes stacksize 8192 kbytes coredumpsize unlimited descriptors 64 memorysize unlimited Hiya 4: limit coredumpsize 1 megabyte Hiya 5: limit cputime unlimited filesize unlimited datasize 2097148 kbytes stacksize 8192 kbytes coredumpsize 1024 kbytes descriptors 64 memorysize unlimited Hiya 6: In this example, the user has limited the size of program core dumps to one megabyte. Program core dumps and their core files are not to be confused with system crash dumps and their savecore files. A thousand users can all be crashing their own programs and the system will still be running like a champ and your data will still be safe well, unless you are running one of the buggy programs! |