Why are core dump files generated?

前端 未结 7 543
鱼传尺愫
鱼传尺愫 2020-12-05 11:10

Sometimes when I run my code, a core dump file is generated when I terminate the program by Ctrl+\\. The file name is of the form core.*.

相关标签:
7条回答
  • 2020-12-05 11:58

    The point of Ctrl + \ is to generate a core dump. That's what SIGQUIT does. If you don't want it to be generated, use Ctrl + C (SIGINT) instead. If the program in question is not responding to SIGINT but you need to kill it from the terminal, either you or the developer is doing something wrong.

    Programs designed not to be killed from the terminal with Ctrl + C should still respond gracefully to SIGTERM, which can be triggered in another terminal via kill -TERM .... If all else fails, SIGKILL will force an immediate termination.

    0 讨论(0)
提交回复
热议问题