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
void create_dump(void) { if(!fork()) { // Crash the app in your favorite way here abort() || (*((void*)0) = 42); } }
Fork the process then crash the child - it'll give you a snapshot whenever you want