haitao:
书上说sigpipe缺省是exit,我改了一下,还是那样跳出来
[阅读: 804] 2005-02-04 09:40:25
void OnSignal(int nSig)
{
switch (nSig)
{
case SIGPIPE:
commlogStr(loglevel2,"监控客户端主动断线");
break;
case SIGBUS:
break;
case SIGINT:
exitapp=1;
commlogStr(loglevel2,"[linux]Ctrl-C");
CRTfree();
printf(" 正在退出 MP ...\n");
commlogSrc(loglevel2);
exit(110);
break;
case SIGQUIT:
break;
case SIGSTOP:
break;
default :
break;
}
}