我想使用SIGPIPE
调试失败的服务。所以我为SIGPIPE
安装了一个信号处理程序,并在其中调用abort()
以获得核心转储。
但我没有。我已设置sysctl -w kernel.core_pattern=/tmp/core
以将core
转换为tmp
,并设置为/etc/security/limits.conf
和ulimit -c unlimited
那么,我怎样才能获得core
?
我的xinetd-service文件如下所示:
service netmaumau
{
socket_type = stream
protocol = tcp
port = 8899
type = UNLISTED
flags = KEEPALIVE
disable = no
wait = yes
user = heiko
instances = 1
cps = 1 10
server = /long/path/to/nmm-server
server_args = -a
log_on_success = PID HOST EXIT
log_on_failure = HOST
}
答案 0 :(得分:0)
添加
struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY };
setrlimit(RLIMIT_CORE, &rl);
解决了问题