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.
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.