I have a program (not written by me) that works as expected, except that it segfaults and dumps core just before exiting. This problem will eventually be fixed, but for now, I would like to use this program without sprinkling `.core` files everywhere. Can I disable core dumps on a per-process basis? Ideally, it would look something like this:
In particular, I do not want to globally disable core dumps, as I would like to have them around for other processes. I just want to disable them for this command.
Code:
$ COREDUMP=/dev/null ./bad_program
In particular, I do not want to globally disable core dumps, as I would like to have them around for other processes. I just want to disable them for this command.