测了一下,这样对于每个shell都是有效的,可以获取到当机堆栈
2,在程序里加入
引用:#include
#include
rlimit sLimit;
sLimit.rlim_cur = -1;
sLimit.rlim_max = -1;
::setrlimit(RLIMIT_CORE, &sLimit);
引用:#include
#include
rlimit sLimit;
sLimit.rlim_cur = -1;
sLimit.rlim_max = -1;
::setrlimit(RLIMIT_CORE, &sLimit);