我想调试一个失败并显示
SIGPIPE
的服务。因此,我为 SIGPIPE
安装了一个信号处理程序,并在其中调用 abort()
来获取核心转储。
但我什么也没得到。我已设置
sysctl -w kernel.core_pattern=/tmp/core
将核心转储放入 tmp
,并且我设置了 /etc/security/limits.conf
和 ulimit -c unlimited
那么,如何获得核心转储?
我的 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
}
添加
struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY };
setrlimit(RLIMIT_CORE, &rl);
问题解决了