| SYS :: SYNCALS :: Block. ½ÅÈ£ Àü´ÞÀ» Â÷´ÜÇÏ´Â °£´ÜÇÑ ÀÎÅÍÆäÀ̽º |
Áö±Ý ´Ù¿î·Îµå |
SYS :: SYNCALS :: Block. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Michael Schout
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~mschout/
SYS :: SYNCALS :: Block. ű×
SYS :: SYNCALS :: Block. ¼³¸í
½ÅÈ£ Àü´ÞÀ» Â÷´ÜÇÏ´Â °£´ÜÇÑ ÀÎÅÍÆäÀ̽º SYS :: SIGNALS :: BLOCKÀº ƯÁ¤ ½ÅÈ£ÀÇ Àü´ÞÀ» ½±°Ô Â÷´ÜÇÏ´Â ½¬¿î ¹æ¹ýÀ» Á¦°øÇÏ´Â PERL ¸ðµâÀÔ´Ï´Ù. ÀÌ°ÍÀº º»ÁúÀûÀ¸·Î POSIX :: SIGPROCMASK (SIG_BLOCK, ...) ¹× POSIX :: SIGPROCMASK (SIG_UNBLOCK, ...) ÁÖÀ§ÀÇ ·¡ÆÛÀÌÁö¸¸ Â÷´ÜµÇ¾î¾ßÇÏ´Â ½ÅÈ£ ÁýÇÕÀÌ ÈξÀ °£´ÜÇÕ´Ï´Ù. °¡Á® ¿À±â ¸ñ·Ï (¸ðµâ »ç¿ë ÇàÀÇ ¸Å°³ º¯¼ö). ½ÅÈ£ °ªÀº ¼ýÀÚ ¶Ç´Â ¹®ÀÚ¿ À̸§ ÀÏ ¼ö ÀÖ½À´Ï´Ù. À̸§ÀÌ ÁÖ¾îÁö¸é SIG Á¢µÎ¾î°¡ Àְųª¾ø´Â °æ¿ì¿¡´Â ÁÖ¾îÁú ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î, ´ÙÀ½Àº ¸ðµÎ ÀÌ¿Í µ¿µîÇÕ´Ï´Ù. # À̸§, SIG Á¢µÎ¾î ¾øÀ½ sys :: signals :: block qw (¿ë¾î int); # SIG Á¢µÎ¾î°¡ÀÖ´Â À̸§ SYS :: SIGNALS :: BLOCK QW (SIGTERM SIGINT); # Á¤¼ö, POSIX »ó¼ö »ç¿ë SYS :: SIGNALS :: BLOCK (POSIX :: SIGTERM, POSIX :: SIGINT); ½Ã³ñ½Ã½º SYS :: SIGNALS :: BLOCK QW (¿ë¾î int); sys :: signals :: block-> block; # Áß¿äÇÑ ¼½¼Ç. # sigint, sigtermÀº sys :: signals :: block-> unblock; # Áß¿ä ¼½¼Ç Áß¿¡ Àü¼Û µÈ ½ÅÈ£´Â ¿©±â¿¡ Àü´ÞµË´Ï´Ù. ¶Ç´Â °´Ã¼ ±¸¹®À» ¼±È£ÇÏ´Â °æ¿ì : MY $ SIGS = SYS :: Signals :: Block-> ÀνºÅϽº; $ sigs-> ºí·Ï; # Áß¿ä ¼½¼Ç $ sigs-> Â÷´Ü ÇØÁ¦; ¿ä±¸ »çÇ× : ¡¤ Perl.
SYS :: SYNCALS :: Block. °ü·Ã ¼ÒÇÁÆ®¿þ¾î