Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6660385
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2010-10-12 09:28:38

http://blog.163.com/hzr163_2004/blog/static/3308607520106254328196/

 void InstalSignal()
{
    signal(SIGHUP ,SIG_IGN); /* hangup, generated when terminal disconnects */
    signal(SIGINT ,SIG_IGN); /* interrupt, generated from terminal special char */
    signal(SIGQUIT ,SIG_IGN); /* (*) quit, generated from terminal special char */
    signal(SIGILL ,SIG_IGN); /* (*) illegal instruction (not reset when caught)*/
    signal(SIGTRAP ,SIG_IGN); /* (*) trace trap (not reset when caught) */
    signal(SIGABRT ,SIG_IGN); /* (*) abort process */
    #ifdef D_AIX
    signal(SIGEMT ,SIG_IGN); /* EMt intruction */
    #endif
    signal(SIGFPE ,SIG_IGN); /* (*) floating point exception */
    signal(SIGKILL ,SIG_IGN); /* kill (cannot be caught or ignored) */
    signal(SIGBUS ,SIG_IGN); /* (*) bus   error (specification exception) */
    signal(SIGSEGV ,SIG_IGN); /* (*) segmentation violation */
    signal(SIGSYS ,SIG_IGN); /* (*) bad argument to system call */
    signal(SIGPIPE ,SIG_IGN); /* write on a   pipe with no one to read it */
    signal(SIGALRM ,SIG_IGN); /* alarm clock timeout */
    //signal(SIGTERM ,stopproc   ); /* software termination signal */
    signal(SIGURG ,SIG_IGN); /* (+) urgent contition on I/o channel */
    signal(SIGSTOP ,SIG_IGN); /* (@) stop (cannot be caught or ignored) */
    signal(SIGTSTP ,SIG_IGN); /* (@) interactive stop */
    signal(SIGCONT ,SIG_IGN); /* (!) continue (cannot be caught or ignored) */
    signal(SIGCHLD ,SIG_IGN); /* (+) sent to parent on child stop or exit */
    signal(SIGTTIN ,SIG_IGN); /* (@) background read attempted from control terminal*/
    signal(SIGTTOU ,SIG_IGN); /* (@) background write attempted to control terminal */
    signal(SIGIO ,SIG_IGN); /* (+) I/o possible, or completed */
    signal(SIGXCPU ,SIG_IGN); /* cpu   time limit exceeded (see setrlimit()) */
    signal(SIGXFSZ ,SIG_IGN); /* file size limit exceeded (see setrlimit()) */
  
    #ifdef D_AIX
    signal(SIGMSG ,SIG_IGN); /* input data   is   in the ring buffer */
    #endif
  
    signal(SIGWINCH,SIG_IGN); /* (+) window size changed */
    signal(SIGPWR ,SIG_IGN); /* (+) power-fail restart */
    //signal(SIGUSR1 ,stopproc); /* user defined signal 1 */
    //signal(SIGUSR2 ,stopproc); /* user defined signal 2 */
    signal(SIGPROF ,SIG_IGN); /* profiling time alarm (see setitimer) */
  
    #ifdef D_AIX
    signal(SIGDANGER,SIG_IGN); /* system crash imminent; free up some page space */
    #endif
  
    signal(SIGVTALRM,SIG_IGN); /* virtual time alarm (see setitimer) */
  
    #ifdef D_AIX
    signal(SIGMIGRATE,SIG_IGN); /* migrate process */
    signal(SIGPRE ,SIG_IGN); /* programming exception */
    signal(SIGVIRT ,SIG_IGN); /* AIX   virtual time alarm */ 
    signal(SIGALRM1,SIG_IGN); /* m:n condition variables - RESERVED - DON 't USE */
    signal(SIGWAITING,SIG_IGN); /* m:n scheduling - RESERVED - DON 't USE */
    signal(SIGCPUFAIL ,SIG_IGN); /* Predictive De-configuration of Processors   - */
    signal(SIGKAP,SIG_IGN);   /* keep alive poll from native keyboard */
    signal(SIGRETRACT,SIG_IGN); /* monitor mode should be relinguished */
    signal(SIGSOUND ,SIG_IGN); /* sound control has   completed */
    signal(SIGSAk ,SIG_IGN); /* secure attention key */
    #endif
}
阅读(2215) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~