I want a C program to produce a core dump under certain circumstances. This is a program that runs in a production environment and isn\'t easily stopped and restarted to adj
The source code to produce a core dump is in 'gcore', which is part of the gdb package.
Also, the Sun has gcore.
Also, you have to have a separate process running the core dump, as the current process must be suspended. You'll find the details in the gcore source, or you can just run your platform's gcore with your process as the target.