Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
both answers are spot on but I can only select one as accepted –  user7321 Jul 6 '09 at 21:33
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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