I have a couple of process running through the init system. They're all forked by process A.
So in my init script, I have something like this:
ulimit -c unlimited
cd /usr/bin/ && ./proc_A
proc_A will then fork proc_B and proc_C, etc.
When proc_A causes a segfault, a core file will be dumped into /usr/bin. But this is not the case for proc_B and proc_C. Why?
Actually first thing a child process does is chdir("/") and root is not writable. Mystery solved.