Unable to create a core file for my crashed program

前端 未结 4 2396
遥遥无期
遥遥无期 2021-02-20 13:30

I am using Ubuntu 12.04 LTS. I wrote a simple program as follows to create crash

// null.c
#include

int main()
{
   int *p = NULL;
   int k=*p;
          


        
4条回答
  •  礼貌的吻别
    2021-02-20 14:36

    My understanding is that using ulimit is not permanent, i.e. if you reboot then the limit goes back to 0. To have unlimited permanent, you need to change /etc/security/limits.conf. Similarly for core pattern etc, change /etc/sysctl.conf.

提交回复
热议问题