Limiting the core file size

时间:2017-08-05 10:46:17

标签: linux arm core setrlimit

I am trying to truncate the core file size for my application. I tried using setrlimit() function but no luck.

Observations:
I set rlim_cur = 270 which is 270 * 1024 = 276480 bytes, and if core file is less than 276480 bytes only then the core file is getting generated. Core files with more than 276480 bytes size are not generated. When I set rlim_cur = RLIM_INFINITY all core files are getting generated. Basically I am not able to truncate the file size to required size. Please suggest.

Thanks in advance.

1 个答案:

答案 0 :(得分:-1)

尝试thisthis,这些链接解释了硬限制和软限制以及ulimit命令