免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: allfresh
打印 上一主题 下一主题

为什么在网络不稳定时,服务器会出现z进程? [复制链接]

论坛徽章:
0
11 [报告]
发表于 2005-10-28 22:06 |只看该作者
[php]\r\n/* handle all varieties of core dumping signals */\r\nstatic void sig_coredump(int sig)\r\n{\r\n    apr_filepath_set(ap_coredump_dir, pconf);\r\n    apr_signal(sig, SIG_DFL);\r\n#if AP_ENABLE_EXCEPTION_HOOK\r\n    run_fatal_exception_hook(sig);\r\n#endif\r\n    /* linuxthreads issue calling getpid() here:\r\n     *   This comparison won\'t match if the crashing thread is\r\n     *   some module\'s thread that runs in the parent process.\r\n     *   The fallout, which is limited to linuxthreads:\r\n     *   The special log message won\'t be written when such a\r\n     *   thread in the parent causes the parent to crash.\r\n     */\r\n    if (getpid() == parent_pid) {\r\n        ap_log_error(APLOG_MARK, APLOG_NOTICE,\r\n                     0, ap_server_conf,\r\n                     \"seg fault or similar nasty error detected \"\r\n                     \"in the parent process\";\r\n        /* XXX we can probably add some rudimentary cleanup code here,\r\n         * like getting rid of the pid file.  If any additional bad stuff\r\n         * happens, we are protected from recursive errors taking down the\r\n         * system since this function is no longer the signal handler   GLA\r\n         */\r\n    }\r\n    kill(getpid(), sig);\r\n    /* At this point we\'ve got sig blocked, because we\'re still inside\r\n     * the signal handler.  When we leave the signal handler it will\r\n     * be unblocked, and we\'ll take the signal... and coredump or whatever\r\n     * is appropriate for this particular Unix.  In addition the parent\r\n     * will see the real signal we received -- whereas if we called\r\n     * abort() here, the parent would only see SIGABRT.\r\n     */\r\n}\r\n[/php]

论坛徽章:
0
12 [报告]
发表于 2005-10-28 23:42 |只看该作者
谢谢pardream和funnyok两位大虾 我试试~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP