While developing it is very common our application exiting abnormally. This abnormally terminating program could generating core dump file which if many times happened could consume our disk space.

There are at least two ways to eliminate the core dump file. The first way is limiting core file size using command ulimit -c 0 from command line. Another way is from inside your program, catch the following signal :

  • SIGQUIT (3)
  • SIGILL (4)
  • SIGTRAP (5)
  • SIGABRT (6)
  • SIGEMT (7)
  • SIGFPE (8)
  • SIGBUS (10)
  • SIGSEGV (11)
  • SIGSYS (12)
  • SIGXCPU (30)
  • SIGXFSZ (31)