dabaj
02-25-2003, 01:36 PM
I'm just starting out with SAMS Teach Yourself Linux Programming in 24 Hours. Sadly, I've run into a slight problem almost at the get-go. When I enter their 1st little piece of code (which contains a deliberate error...a null pointer violation), compile it, and then run it, I get the described Segmentation fault, but no core dump. Is there another command-line option I'm missing? I thought a core dump was done automatically when any executable failed. Any help would be appreciated, thanks! Oh, attached is the program...
bwkaz
02-25-2003, 01:55 PM
There are user limit quotas set on stuff like core dump file sizes. If the core dump file size ulimit is zero, you won't get a file. This is generally a good idea anyway, because core dumps can contain a LOT of sensitive info (if it's not just a program you wrote, if something like X segfaults for instance, it might have stored a certain string that was displayed at the time somewhere in memory), which is why most distros turn it off.
If you want it on, then do a ulimit -c unlimited as your user, then run the program, then do a ulimit -c 0 to set it back to zero.