Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ºÍUnix

Ò»¡¢Àí½âLinuxµÄµ¥Óû§¶àÈÎÎñ£¬¶àÓû§¶àÈÎÎñ¸ÅÄ
Linux ÊÇÒ»¸ö¶àÓû§¡¢¶àÈÎÎñµÄ²Ù×÷ϵͳ£»ÎÒÃÇÓ¦¸ÃÁ˽ⵥÓû§¶àÈÎÎñºÍ¶àÓû§¶àÈÎÎñµÄ¸ÅÄ
1¡¢Linux µÄµ¥Óû§¶àÈÎÎñ£»
µ¥Óû§¶àÈÎÎñ£»±ÈÈçÎÒÃÇÒÔbeinan µÇ¼ϵͳ£¬½øÈëϵͳºó£¬ÎÒÒª´ò¿ªgedit À´Ð´Îĵµ£¬µ«ÔÚдÎĵµµÄ¹ý³ÌÖУ¬ÎҸоõÉÙµãÒôÀÖ£¬ËùÒÔÓÖ´ò¿ªxmms À´µãÒôÀÖ£» ......

linux »ù±¾ÃüÁî

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

linux°üÒÀÀµÎÊÌâ½â¾ö

×òÌìÍíÉÏ×¼±¸×°subversion ½á¹ûÅöµ½Ò»¸öºÜÄÕ»ðµÄÎÊÌâ
[root@rhel6beta Packages]# rpm -ivh libproxy-0.3.0-1.el6.i686.rpm
warning:
libproxy-0.3.0-1.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID
f21541eb: NOKEY
error: Failed dependencies:
        libproxy-b ......

Linux²Ù×÷ϵͳÏÂÈçºÎÌí¼Ó·þÎñ

#!/bin/sh ÊÇ˵Ã÷¸Ã½Å±¾µ÷ÓõÄshellµÄÀàÐÍ
 
#chkconfig: 2345 80 05 ÆäÖÐ2345ÊÇÖ¸Ã÷·þÎñµÄÔËÐеȼ¶£¬80±íÃ÷ÊÇϵͳÆô¶¯Ê±ÒªÆô¶¯µÚ80ºÅ·þÎñ£¨·þÎñºÅ¿ÉÒÔÖظ´£©¡£05±íÃ÷ÊÇϵͳ¹Ø±ÕҪֹͣµÄ·þÎñºÅ¡£
 
#descrīption: service ÕâÀïµÄserviceÄã¿ÉÒÔËæ±ãÌí£¬µ«±ØÐëÓÐ
 
case $1 in ÕâÀïµÄcaseÊǸöÑ¡ÔñÓ ......

Java ʹÓÃSSHÁ¬½ÓLinux ʹÓÃpasswdÃüÁîÐÞ¸ÄÃÜÂë


ʹÓÃInputStreamºÍOutputStreamÀ´»ñµÃÃüÁîÐÐÔËÐнá¹ûºÍÊäÈëÄÚÈÝÊÇÊ×ÏÈÐèÒª¾ß±¸µÄ.
È»ºóÒª½â¾öSSHÁ¬½ÓÎÊÌâ.
ÔÚOpenSourceÏîÄ¿ÀïÕÒµ½ÁËGanymed SSH-2 for Java .ÏÂÔغóÓÐÀý×Ó,µ«ÊÇûÓÐÕÒµ½Óйؽ»»¥ÃüÁîµÄÀý×Ó.ËùÒÔ×Ô¼ºÌ½Ë÷ÁËÒ»ÏÂ
ÔÚÍøÉÏ¿´ÓÐÀÏÍâÌÖÂÛÓÃÕâ¸öÈçºÎ¸ÄÃÜÂë,»ù±¾ÉϵÄÎÊÌⶼÊÇÒòΪÕÒ²»µ½·µ»ØµÄÌáʾ
LinuxÐÞ¸ÄÃÜ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ