1. 修改其代码nsd/nsmain.c,在ns_fork()前添加:
Ns_Log(Warning, "---------------weiqiong added for core file----------------");
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0)
{
Ns_Fatal("nsmain: prctl(PR_SET_DUMPABLE) failed: '%s'",strerror(errno));
}
2. 将/etc/inittab文件中的启动行改为:
wm:23:respawn:/bin/sh -c "ulimit -c unlimited;/usr/local/aol/bin/nsd -it /usr/local/aol/sample-config.tcl -u xmail -g xmail"