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

linux signalº¯Êý

CÓïÑÔÖеijéÏóº¯Êý¶¨ÒåÒ²¾ÍÊÇʹÓÃÁ˺¯ÊýÖ¸Õ룬ÕâÀïÓÃsignalº¯Êý½âÊÍһϳéÏóº¯Êý¶¨ÒåµÄº¬ÒåºÍ¹æÔò¡£
signalº¯Êý¶¨ÒåΪ£º
void (   * signal (int signum , void (*handler)(int)  )   )(int);
 
¿ÉÒÔÕâÑù¶¨Òå
typedef  void(* handler) (int)
handler signal(int signum,handler)
 
ͨË×µÄ˵£º
signal ÊÇÒ»¸öº¯Êý Õâ¸öº¯ÊýÓÐÁ½¸ö²ÎÊýÒ»¸öΪint signum £¬Ò»¸öÊÇÒ»¸öº¯ÊýÖ¸Õë handler£¬handler ÊÇÒ»¸öÓÐÒ»¸öint²ÎÊý ÇÒ·µ»ØֵΪvoidµÄº¯ÊýÖ¸Õë¡£ signal ·µ»ØÒ»¸öº¯ÊýÖ¸Õë void £¨*£©£¨int£©
¼´signalº¯Êý ¸øsignum  Õâ¸öÐźŰ²×°ÐźŴ¦Àíº¯Êý handler £¬Èç¹û°²×°³É¹¦Ôò·µ»Ø ´¦Àíº¯ÊýÖ¸Õë¼´hander
 
×÷Ϊº¯Êý²ÎÊýµÄº¯ÊýÖ¸ÕëÓÐÒ»¸öרÃŵÄÃû³Æ½Ð×ö»Øµ÷£¬Äã¿ÉÒÔ°ÑÈÎÒâÂú×ã»Øµ÷º¯Êý²ÎÊýÌØÕ÷±êµÄº¯ÊýµØÖ·×÷Ϊ²ÎÊý´«¸øsignal¡£
ÔÚÕâÀïÒòΪsignal¶ÔÓÚsig²ÎÊý¿ÉÒÔÖ¸¶¨Óû§×Ô¶¨ÒåµÄÐźŴ¦Àíº¯Êý£¬ËùÒÔÄã¿ÉÒÔ°ÑÄãÒª´¦ÀíµÄÕâ¸ösigµÄº¯ÊýµØÖ·×÷Ϊ²ÎÊý´«¸øsignal£¬ÄÇôϵͳ½ÓÊÕµ½¶ÔÓ¦sigµÄʱºò¾Í»áͨ¹ýÄã´«½øÈ¥µÄµØÖ·µ÷ÓÃÄãµÄÕâ¸öº¯Êý¡£


Ïà¹ØÎĵµ£º

linux Kill¶à¸ö½ø³Ì

¾­³£ÐèÒªKill¶à¸ö½ø³Ì£¬ÕâЩ½ø³Ì°üº¬¹²Í¬µÄ¹Ø¼ü×Ö£¬¿ÉÒÔÓÃÒ»ÌõÃüÁîKillµôËüÃÇ¡£ ps aux | grep "common" | cut –c 9-15 | xargs kill –9 ¹ÜµÀ·û¡°|¡±ÓÃÀ´¸ô¿ªÁ½¸öÃüÁ¹ÜµÀ·û×ó±ßÃüÁîµÄÊä³ö»á×÷Ϊ¹ÜµÀ·ûÓÒ±ßÃüÁîµÄÊäÈë¡£ÏÂÃæ˵˵ÓùܵÀ·ûÁª½ÓÆðÀ´µÄ¼¸¸öÃüÁ "ps aux" ²é¿´ËùÓнø³ÌµÄÃüÁî¡£Õâʱ¼ìË÷³öµÄ ......

linux »ù±¾ÃüÁî

ls  :²é¿´µ±Ç°Ä¿Â¼ÏµÄÎļþ
ls -l ;ÒÔÍêÕû¸ñʽ²é¿´Îļþ
help;²é¿´°ïÖúÐÅÏ¢
man;Ò²ÊDz鿴°ïÖúÐÅÏ¢,µ«ÊDZÈhelp¸üÏêϸ
info;ͬÑùÊDz鿴°ïÖúÐÅÏ¢,±Èman¸üÏêϸ
cp;¿½±´Îļþ(Ò²¿ÉÒÔ¿½±´Ä¿Â¼)
mv;Òƶ¯Îļþ»òÕßÖØÃüÃû
rm;ɾ³ýÎļþ
pwd;²é¿´ÎļþµÄÍêÕû·¾¶
touch ;´´½¨¿ÕÎļþ
cd;¸Ä±äµ±Ç°Â·¾¶
cat;²é¿´ÎļþÄÚÈÝ
mor ......

²¦¿ªÃÔÎí µ¥Æ¬»úºÍǶÈëʽLINUX¿ª·¢µÄÄǵãʶù

×÷ÕߣºÎ¤¶«É½,»ªÇåÔ¶¼ûǶÈëʽѧԺ½²Ê¦¡£
Ëæ×ÅǶÈëʽÐÐÒµÓ²¼þƽ̨µÄÐÔÄÜÔöÇ¿£¬ÏîÄ¿ÐèÇóºÍ¹¦ÄÜÈÕÒ渴ÔÓ£¬ARM¹«Ë¾ÍƳöµÄ CORTEX-M3£¬¸üÊÇÈÃÒÔÍù×öµ¥Æ¬»úµÄ¹¤³ÌʦÔÚоƬºÍ¼¼ÊõÑ¡ÐÍÃæÁÙÁ½ÄÑÑ¡Ôñ£¬±¾×¨Ì⽫´ÓоƬ¼Û¸ñ¡¢Õû¸öϵͳµÄÓ²¼þÈí¼þÉè¼Æ¼°Î¬»¤µÄ³É±¾µÈ¸÷¸ö·½Ãæ¸øÄúÌṩһ¸ö²Î¿¼£¬ ²¢´Ó¼¼Êõ½Ç¶È·ÖÎöµ¥Æ¬»úºÍ´ø²Ù×÷ϵͳµÄÏµÍ ......

VMwareÉÏCentOS LinuxÍøÂçÅäÖÃ

½«ÁªÍø·½Ê½ÉèÖÃΪNAT
µÚÒ»²½£º
      cdµ½/etc/sysconfig/network-scriptsϵµÄifcfg-eth0
µÚ¶þ²½£º
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
#BOOTPROTO=static
BOOTPROTO=none
BROADCAST=192.168.174.255
HWADDR=00:0C:29:F2:BB:A9
IPADDR=192.168.174.11 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ