Cores apparently are not dumped when the using
ulimit -c being set to unlimited. Is there any way around this?
sudo will reset the core dump settings, like it does for a lot of other environment state. You can run the program via a helper that first enables core dumps and then runs the program. Create for example a wrapper /usr/local/bin/coredump, with the contents (and chmod +x):
It seems it can be done using the -s option like:
However 2 caveats:
See the following for details: