summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-03-27 13:31:06 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-03-27 13:31:06 +0800
commitf1487a508b7e68c242d092a874d2b4ecd3a1ed6e (patch)
tree72db29ee40c9da8c80221339acf25a75c00a3e3d
parent55367b29e2e0b49e96a9c75f259d60554b45c704 (diff)
downloadpttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar.gz
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar.bz2
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar.lz
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar.xz
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.tar.zst
pttbbs-f1487a508b7e68c242d092a874d2b4ecd3a1ed6e.zip
more meaningful message for SIGXCPU.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3309 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/mbbsd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 71bb5382..19709aa8 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -244,7 +244,11 @@ abort_bbs_debug(int sig)
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
#define CRASH_MSG ANSI_COLOR(0) "\r\n程式異常, 立刻斷線. 請洽 PttBug 板詳述你發生的問題.\r\n"
- write(1, CRASH_MSG, sizeof(CRASH_MSG));
+#define XCPU_MSG ANSI_COLOR(0) "\r\n程式耗用過多計算資源, 立刻斷線. 可能是 (a)執行太多耗用資源的動作 或 (b)程式掉入無窮迴圈. 請洽 PttBug 板詳述你發生的問題.\r\n"
+ if(sig==SIGXCPU)
+ write(1, XCPU_MSG, sizeof(XCPU_MSG));
+ else
+ write(1, CRASH_MSG, sizeof(CRASH_MSG));
/* close all file descriptors (including the network connection) */
for (i = 0; i < 256; ++i)