Reputation: 111
Is it possible to generate a core dump without killing the process? If so, what is the command/signal to do so?
Thanks, Jim
Upvotes: 11
Views: 11940
Reputation: 10197
A method to generate a coredump directly from program without gdb
is described here:
https://unix.stackexchange.com/questions/11185/dump-process-core-without-killing-the-process
It make sense only if you are developing. Principle is to fork program and to raise SIGABRT
from child.
Upvotes: 0
Reputation: 82
I had the best success with attaching gdb in batch mode to the running program, get a backtrace and then detach.
gdb --batch --quiet -ex "set pagination off" -ex "thread apply all bt"
-ex "detach" -ex "quit" pid pid_of_process
Upvotes: 3