Core dump file not generated on segmentation fault

Viewed 25113

I am trying to debug a segmentation fault caused by my C program using gdb. A core dump file is not automatically generated when I run my program,and i have to run the command

ulimit -c unlimited

for a core file to be generated on the next run.

Why is a core dump file not generated automatically and why do I have to run the ulimit command everytime to generate a core file on the next run of my program ?.

The operating system i use is Ubuntu 10.10.

4 Answers
Related