• 信号屏蔽函数


    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
    }
    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
    阅读(965) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~
    评论热议
  • 相关阅读:
    整合SSH遇到的问题
    学习动态代理实现业务层的事务控制遇到的问题
    docker局域网独立IP外网访问配置
    第23次CSP-D题解法
    Nordic Bluetooth 切换到DFU Mode
    MySQL事务、锁和MVCC
    深拷贝和浅拷贝的区别是什么?
    python是如何进行内存管理的
    数据库的事务
    斐波那契数列
  • 原文地址:https://www.cnblogs.com/ztguang/p/12647782.html
Copyright © 2020-2023  润新知