我正在设定
ulimit -c unlimited.
在c ++程序中我们正在做
struct rlimit corelimit;
if (getrlimit(RLIMIT_CORE, &corelimit) != 0) {
return -1;
}
corelimit.rlim_cur = RLIM_INFINITY;
corelimit.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &corelimit) != 0) {
return -1;
}
但是每当程序崩溃时,它生成的核心转储就会被截断.
BFD: Warning: /mnt/coredump/core.6685.1325912972 is truncated: expected core file size >= 1136525312, found: 638976.
可能是什么问题?
我们正在使用 Ubuntu 10.04.3 LTS
Linux ip- 2.6.32-318-ec2 #38-Ubuntu SMP Thu Sep 1 18:09:30 UTC 2011 x86_64 GNU/Linux
这是我的/etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#
#
#Where:
# can be:
# - an user