Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux ÐźÅsignal´¦Àí»úÖÆ ËÄ

4¡¢alarmºÍ setitimerϵͳµ÷ÓÃ
        ϵͳµ÷ÓÃalarmµÄ¹¦ÄÜÊÇÉèÖÃÒ»¸ö¶¨Ê±Æ÷£¬µ±¶¨Ê±Æ÷¼Æʱµ½´ïʱ£¬½«·¢³öÒ»¸öÐźŸø½ø³Ì¡£¸Ãµ÷ÓõÄÉùÃ÷¸ñʽÈçÏ£º
        unsigned int alarm(unsigned int seconds);
        ÔÚʹÓøõ÷ÓõĽø³ÌÖмÓÈëÒÔÏÂÍ·Îļþ£º
        #include <unistd.h>
        ϵ
ͳµ÷ÓÃalarm°²ÅÅÄÚºËΪµ÷Óýø³ÌÔÚÖ¸¶¨µÄsecondsÃëºó·¢³öÒ»¸öSIGALRMµÄÐźš£Èç¹ûÖ¸¶¨µÄ²ÎÊýsecondsΪ0£¬Ôò²»ÔÙ·¢ËÍ
SIGALRMÐźš£ºóÒ»´ÎÉ趨½«È¡ÏûÇ°Ò»´ÎµÄÉ趨¡£¸Ãµ÷Ó÷µ»ØֵΪÉϴζ¨Ê±µ÷Óõ½·¢ËÍÖ®¼äÊ£ÓàµÄʱ¼ä£¬»òÕßÒòΪûÓÐÇ°Ò»´Î¶¨Ê±µ÷Óöø·µ»Ø0¡£
        ×¢Ò⣬ÔÚʹÓÃʱ£¬alarmÖ»É趨Ϊ·¢ËÍÒ»´ÎÐźţ¬Èç¹ûÒª¶à´Î·¢ËÍ£¬¾ÍÒª¶à´ÎʹÓÃalarmµ÷Óá£
       
¶ÔÓÚalarm£¬ÕâÀï²»ÔÙ¾ÙÀý¡£ÏÖÔÚµÄϵͳÖкܶà³ÌÐò²»ÔÙʹÓÃalarmµ÷Ó㬶øÊÇʹÓÃsetitimerµ÷ÓÃÀ´ÉèÖö¨Ê±Æ÷£¬ÓÃgetitimerÀ´µÃµ½
¶¨Ê±Æ÷µÄ״̬£¬ÕâÁ½¸öµ÷ÓõÄÉùÃ÷¸ñʽÈçÏ£º
        int getitimer(int which, struct itimerval *value);
        int setitimer(int which, const struct itimerval *value,
struct itimerval *ovalue);
        ÔÚʹÓÃÕâÁ½¸öµ÷ÓõĽø³ÌÖмÓÈëÒÔÏÂÍ·Îļþ£º
        #include <sys/time.h>
       
¸Ãϵͳµ÷Óøø½ø³ÌÌṩÁËÈý¸ö¶¨Ê±Æ÷£¬ËüÃǸ÷×ÔÓÐÆä¶ÀÓеļÆʱÓò£¬µ±ÆäÖÐÈκÎÒ»¸öµ½´ï£¬¾Í·¢ËÍÒ»¸öÏàÓ¦µÄÐźŸø½ø³Ì£¬²¢Ê¹µÃ¼ÆʱÆ÷ÖØпªÊ¼¡£Èý¸ö¼ÆʱÆ÷ÓɲÎ
ÊýwhichÖ¸¶¨£¬ÈçÏÂËùʾ£º
        TIMER_REAL£º°´Êµ¼Êʱ¼ä¼Æʱ£¬¼Æʱµ½´ï½«¸ø½ø³Ì·¢ËÍSIGALRMÐźš£
        ITIMER_VIRTUAL£º½öµ±½ø³ÌÖ´ÐÐʱ²Å½øÐмÆʱ¡£¼Æʱµ½´ï½«·¢ËÍSIGVTALRMÐźŸø½ø³Ì¡£
       
ITIMER_PROF£ºµ±½ø³ÌÖ´ÐÐʱºÍϵͳΪ¸Ã½ø³ÌÖ´Ðж¯×÷ʱ¶¼¼Æʱ¡£ÓëITIMER_VIR-TUALÊÇÒ»¶Ô£¬¸Ã¶¨Ê±Æ÷¾­³£ÓÃÀ´Í


Ïà¹ØÎĵµ£º

Connection reset by peer > Linux ϵĴíÎó error.h

ÎÊÌ⣺Á½Ì¨DVRͬʱÁ¬½Óͬһ̨2·µÄDVS£¬ÆäÖÐһ̨DVRÕý³£Á¬½ÓDVSµÄÁ½Â·Êä³ö£¬Ô¤ÀÀÒ²Õý³£¡£
         ¶øÁíһ̨DVRÖ»ÄÜÁ¬ÉÏDVSµÄ1·Êä³ö£¬Áíһ·ÔõôҲÁ¬²»ÉÏ¡£
        
         ¸ú×Ù·¢ÏÖ£¬D ......

Redhat Linux AS4 ls Îļþ¼Ð ÑÕÉ«£¨À¶É«£©µÄ ¸Ä±ä·½·¨

Îı¾½çÃæÏ£¬ºìñÓÃÀ¶É«×÷ΪlsµÄĿ¼µÄÑÕÉ«£¬ÅäºÏËûµÄºÚÉ«±³¾°£¬¸Ð¾õÌ«°µÁË£¬¿´²»Çå¡£
¸Ä³É±ðµÄÑÕÉ«µÄ·½·¨£º
Ê×ÏÈ£¬
# vi
/etc/DIR_COLORS
ÄÚµÄÉ趨“DIR 01£»34”£¬ÎªlsÃüÁîµÄĿ¼µÄÑÕÉ«ÉèÖã¬01±íʾ´ÖÌ壬34±íʾ×ÖÌåÀ¶É«¡£
ÎÒ°ÑËü
¸Ä³ÉÁË“DIR 01£»37£»44”£¬37ÊÇ×ÖÌå°×É«£¬44ÊÇ×Ö±³¾°À¶É«£¬ ......

linux ÏÂwhich¡¢whereis¡¢locate¡¢findÇø±ð

µ±ÎÒÃÇÐèҪij¸öÎļþ»òĿ¼ʱ£¬¶øÓÖ²»ÖªµÀ¸ÃÎļþ·ÅÔÚʲôµØ·½£¬Ôõô°ì£¿
ÔÚwindowsÏÂÃ棬¿ÉÒÔͨ¹ý“ËÑË÷”¹¦ÄܽøÐвéÕÒ£¬¶øÔÚlinuxÏ£¬Í¬ÑùÓÐÏàͬµÄ¹¦ÄÜ£º
which       ²é¿´¿ÉÖ´ÐÐÎļþµÄλÖÃ
whereis     ²é¿´ÎļþµÄλÖÃ
locate    &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ