I have a daemon I wrote in c/c++. i normally run ulimit -c unlimited before starting the daemon so if it segfaults I'll get the core file. Is there a way I can set the system to by default dump core files without having to specify the ulimit for each session? fyi- i'm rolling on debian.

  • both answers are spot on but I can only select one as accepted – user7321 Jul 6 '09 at 21:33

I would imagine editing /etc/security/limits.conf can control it for most normal login sessions.

For anything else (cron jobs, system services etc), you will probably want to just do it in the script kicking it off.


You can also programmatically enable cores in your daemon with setrlimit - it's probably a good idea to trigger that with a command line option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.