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.