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ÊÇÒ»¶Ô£¬¸Ã¶¨Ê±Æ÷¾³£ÓÃÀ´Í
Ïà¹ØÎĵµ£º
Ϊ Linux Ó¦ÓóÌÐò±àд DLL ÔÚ½ö½öÖ»»á±àд²å¼þµÄʱºòΪʲôҪ±àдÕû¸öÓ¦ÓóÌÐò£¿
ÎĵµÑ¡Ïî
´òÓ¡±¾Ò³
½«´ËÒ³×÷Ϊµç×ÓÓʼþ·¢ËÍ ¼¶±ð£º ³õ¼¶ Allen Wilson (wilsona@us.ibm.com), µç×ÓÉÌÎñÉè¼Æʦ, IBM 2001 Äê 10 Ô 01 ÈÕ ²å¼þºÍ DLL ͨ³£ÊÇÓÃÀ´ÎÞÐë±àдÕû¸öÐÂÓ¦ÓóÌÐò¶øÌí¼Ó¹¦Äܵļ ......
ÔÎÄ£ºhttp://www.webjx.com/htmldata/2007-10-05/1191585088.html
°´³£Àí²»¿ÉÒÔÍü¼ÇrootÓû§ÃÜÂëµÄ£¬µ«ÊÇÈç¹ûÕæµÄÍü¼ÇÁË£¬Ò²²»ÓóÕâ¸öÊÇÓа취½â¾öµÄ¡£
15Ãë»Ö¸´rootÃÜÂ룬µ±È»ÊÇûËãÉÏϵͳµÄÆô¶¯Ê±¼äÁË¡£ºÇºÇ¡£
ÏÂÃæÊÇÎÒ¸øroot»Ö¸´ÃÜÂëµÄʵÑé¹ý³Ì.£¨ÓõÄÊÇRHEL4£©¡£
ͼ1
¿ª»úµÄʱºò°´e £¬£¨Èçͼ£¬¾ÍÔÚÕâ¸öʱºò° ......
1:ÏÂÔØÉçÇø°æµÄmysql£¬
ÒªÏÂÔØÁ½¸öÎļþ£¬·Ö±ðΪ£ºMySQL-server-community-5.1.46-1.rhel5.i386.rpm
......
ssh connect to Linux
1,¼ì²éÍøÂçÁ¬½ÓÊÇ·ñÕý³£,¿´¿´ÄãµÄ»úÆ÷ÊÇ·ñ¿ªÁË22ºÅ¶Ë¿Ú,½ø³ÌÊÇ·ñÔËÐÐÕý³£..
2,¿ÉÒÔÔÚ±¾»úÉÏÓÃSSHÃüÁîµÇ½±¾»ú.
#ssh -l yourloginname xxx.xxx.xxx.xxx
ÆäÖÐyourloginnameΪÄã±¾»ú¿ÉÔ¶³ÌµÇ¼Óû§Ãû,xxx.xxx.xxx.xxxΪÄãµÄ»úÆ÷IP,
Èç¹ûµÇ¼Ìáʾ:
Are you sure you want to continue connecting ( ......
¶þ¡¢ÐÅ ºÅ »ú ÖÆ
ÉÏ Ò»½ÚÖнéÉÜÁËÐźŵĻù±¾¸ÅÄÔÚÕâÒ»½ÚÖУ¬ÎÒÃǽ«½éÉÜÄÚºËÈçºÎʵÏÖÐźŻúÖÆ¡£¼´ÄÚºËÈçºÎÏòÒ»¸ö½ø³Ì·¢ËÍÐźš¢½ø³ÌÈçºÎ½ÓÊÕÒ»¸öÐźš¢½ø³ÌÔõÑù¿ØÖÆ×Ô¼º¶ÔÐÅ ºÅµÄ·´Ó¦¡¢ÄÚºËÔÚʲôʱ»ú´¦ÀíºÍÔõÑù´¦Àí½ø³ÌÊÕµ½µÄÐźš£»¹Òª½éÉÜÒ»ÏÂsetjmpºÍlongjmpÔÚÐźÅÖÐÆðµ½µÄ×÷Óá£
1¡¢Äں˶ÔÐźŵĻ ......