ãã·ã°ãã«ãã³ãã©ã®ä¸ã§ã§ãããã¨ã¯é常ã«éããã¦ãããã§ãããã¨ããã話ã1å¹´åãããåã«æ¸ãã¾ãããããã®è©±ã«ã¯ç¶ãããã£ã¦ãããç¹å®ã®æ¡ä»¶ä¸ã§ã¯ãã®å¶éãç·©åãããã¨ãã§ãã¾ããä»åã¯ãã®æ¹æ³ã«ã¤ãã¦ã®è§£èª¬ã§ããsigwait(3)ã¨ããé¢æ°ã使ãã¾ãã â» ãã®è©±ããã£ããæ¸ãå¿ãã¦ãã¾ãããã¡ãã£ã¨ãããã£ããã§æãåºããã®ã§ãæããããã¡ã«æ¸ãã¦ããã¾ãã â ãã·ã°ãã«ãå¾ ã¤ãå¦ç ãå¾æ¥ã®æ¹æ³ã çæ§ããã·ã°ãã«ã®å°çãå¾ ã¤ãå¦çãã次ã®ããã«æ¸ãã¦ãã¾ã£ã¦ããªãã§ããããï¼ // ã·ã°ãã«ãã³ãã© void handler(int signo) { // ãã®ä¸ã§ä½¿ã£ã¦è¯ãã®ã¯éåæã·ã°ãã«ã»ã¼ã(async-signal-safe)ãªé¢æ°ã®ã¿ }ãç¨æãã¦ã sa.sa_handler = handler; sigaction(SIGHUP, &sa, NULL); ..
{{#tags}}- {{label}}
{{/tags}}