设置core大小限制为不限制

设置core大小限制为不限制

int set_corefile_limit(void)
{
    
    
	struct rlimit limit;

	limit.rlim_cur = RLIM_INFINITY;
 	limit.rlim_max = RLIM_INFINITY;
	if (setrlimit(RLIMIT_CORE, &limit)) {
    
    
		printf("set limit core file failed\n");
		return -1;
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/G_Super_Mouse/article/details/109732561
今日推荐