If I only set coredump limit to unlimted. Core dump file is getting generated by linux.
But If I do but signal handling as well as set core dump limit to unlimit. Linux doesn’t generate core dump.
signal(SIGINT, SignalHandler);
signal(SIGSEGV, SignalHandler);
How to generate both text dump as well as core dump in linux ?
Set the signal handler to one shot mode (using the SA_RESETHAND flag to sigaction(2) for example) and call abort() at the end of your custom SIGINT/SIGSEGV signal handler.