ããæ°å¹´ãPHP ã§ã·ã°ãã«ã使ãæ©ä¼ãå¤ãã£ãã®ã§ãæ°ã¥ããç¹ãªã©ãæ´çãã¦ã¿ã¾ãã æ¬å½ã®ã·ã°ãã«ãã³ãã©ã¨ PHP ã®ã·ã°ãã«ãã³ãã© pcntl_signal() ã§ç»é²ãã PHP ã®ã·ã°ãã«ãã³ãã©ã¯ãæ¬å½ã®æå³ã§ã®ã·ã°ãã«ãã³ãã©ã§ã¯ããã¾ããããªã®ã§ãã·ã°ãã«ãã³ãã©ããéåæã·ã°ãã«ã§å®å ¨ã§ã¯ç¡ãé¢æ°ã§ãå¼ã³åºããã¨ãåºæ¥ã¾ãã <?php declare (ticks = 1); pcntl_signal(SIGTERM, function ($signo) { printf("%d -> %s\n", $signo, "ã ãæã"); }); posix_kill(posix_getpid(), SIGTERM); exit(0); æ¬å½ã®ã·ã°ãã«ãã³ãã©ã¯æ¬¡ã®ç®æã§å®ç¾©ããã¦ãããæè¬ãªã³ã¯ããªã¹ãã«åä¿¡ããã·ã°ãã«çªå·ãè¨é²ãã¦ãã¾ãã pcntl.c:1216
ãã«ã¼ã§ãã ï¼åã«åãã¦PHPã«ããUNIXãã¼ã¢ã³ã®ä½ææ¹æ³ã«ã¤ãã¦èª¬æãã¾ãã PHPã¯ä»ã®Lightweight Languageã«æ¯ã¹ã¦Webéçºè¨èªã¨ããå°è±¡ãå¼·ãã§ãããPHPã§ããã¼ã¢ã³ãä½ããã¨ãã§ãã¾ãã ãã¼ã¢ã³ã£ã¦ãªãã ï¼ ã¡ã¢ãªã«å¸¸é§ãããã¯ã°ã©ã¦ã³ãã§æ§ã ãªãµã¼ãã¹ãæä¾ããããã°ã©ã ã§ãã PHPã§ä½ãã¨ä½ãããããï¼ Cè¨èªã§ã¯ãªãPHPã§éçºããäºã§ãéçºæéãç縮ãããã¨ãåºæ¥ã¾ãã ãã¼ã¢ã³ãéçºããä¸ã§æ¼ãããã¹ããã¤ã³ã ãã¼ã¢ã³ãéçºããä¸ã§æ¼ãããã¹ããã¤ã³ãã¯ä»¥ä¸ã®éãã§ãã ã©ããªè¨èªã使ãå ´åã§ãã£ã¦ãå ±éã§ãã ã»ãã·ã§ã³ãç¾å¨ã®ããã»ã¹ããç¬ç«ãããã ãã¼ã¢ã³ã¯ããã¯ã°ã©ã¦ã³ãã§åä½ããçºãå¶å¾¡ç«¯æ«ããåãé¢ãã¾ãã setsidã«ããè¡ãã¾ãããsetsidã¯è¦ªããã»ã¹ã§å¼ã¶ã¨å¤±æããããã forkã§åããã»ã¹çæãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}