LINUX C ¶¨Ê±Æ÷
¡¾ÊµÏÖ¹¦ÄÜ¡¿£ºLinuxϵÄC±à³Ì£º±àдһ¸ö³ÌÐò£¨¿â£©£¬ÊµÏÖ¶¨Ê±Æ÷£¨¼ÆʱÆ÷£©µÄ¹¦ÄÜ£¬ËüÄÜΪÓû§ÌṩÔÚͬһ½ø³ÌÖжà´ÎʹÓõĶ¨Ê±Æ÷¡£ÕâÀïÒªÇóÓÃÐźÅÀ´ÊµÏÖ¡£
¡¾½âÌâ˼·¡¿£º±àдһ¸ö½á¹¹ÌåTimer´ú±íÒ»¸ö¼ÆʱÆ÷£¬È»ºóÔÙ¶¨ÒåTimerÀàÐ͵ÄÊý×émyTimer[N]£¬ÓÃÀ´±£´æÎÒÃÇÉèÖõĶ¨Ê±Æ÷£»ÔÙ¶¨Ò庯ÊýsetTimer£¨£©Éú³É¼ÆʱÆ÷£¬²¢½«Éú³ÉµÄ¼ÆʱÆ÷±£´æµ½myTimerÖУ¬ÕâÑùͨ¹ý¶à´Îµ÷Ó㬾ͿÉÒÔÔÚͬһ¸ö½ø³ÌÖÐÉú³É¶à¸ö¼ÆʱÆ÷£»¶¨Òåtimeout()ÐźŴ¦Àíº¯Êý£¬Ã¿¸ôÒ»Ãë²úÉúÒ»¸öÐźţ¬Í¨¹ýµ÷ÓÃtimeout()¶ÔËùÓеĶ¨Ê±Æ÷ɨÃèÒ»±é£¬¼ì²éÄÄЩ¼ÆʱÆ÷³¬Ê±¡£
¡¾³ÌÐò´úÂë¡¿£ºÈçÏÂ
#include<stdlib.h>
#include<unistd.h>
#include<signal.h>
#include<time.h>
#include<sys/time.h>
#define N 100 //ÉèÖÃ×î´óµÄ¶¨Ê±Æ÷¸öÊý
int i=0,t=1; //i´ú±í¶¨Ê±Æ÷µÄ¸öÊý£»t±íʾʱ¼ä£¬ÖðÃëµÝÔö
struct Timer //Timer½á¹¹Ì壬ÓÃÀ´±£´æÒ»¸ö¶¨Ê±Æ÷µÄÐÅÏ¢
{
int total_time; //ÿ¸ôtotal_timeÃë
int left_time; //»¹Ê£left_timeÃë
int func; //¸Ã¶¨Ê±Æ÷³¬Ê±£¬ÒªÖ´ÐеĴúÂëµÄ±êÖ¾
}myTimer[N]; //¶¨ÒåTimerÀàÐ͵ÄÊý×飬ÓÃÀ´±£´æËùÓеĶ¨Ê±Æ÷
void setTimer(int t,int f) //н¨Ò»¸ö¼ÆʱÆ÷
{
struct Timer a;
a.total_time=t;
a.left_time=t;
a.func=f;
myTimer[i++]=a;
}
void timeout() //Åж϶¨Ê±Æ÷ÊÇ·ñ³¬Ê±£¬ÒÔ¼°³¬Ê±Ê±ËùÒªÖ´ÐеĶ¯×÷
{
printf("Time: %d\n",t++);
int j;
for(j=0;j<i;j++)
{
if(myTimer[j].left_time!=0)
myTimer[j].left_time--;
else
{
switch(myTimer[j].func){ //ͨ¹ýÆ¥ÅämyTimer[j].func£¬ÅжÏÏÂÒ»²½Ñ¡ÔñÄÄÖÖ²Ù×÷
 
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
»¨ÁË°ëÌìÅäÖúÃÁËcygwinµÄ½çÃ棬 ÏÂÃæ×öÒ»¼Í¼£¬ÒÔ±¸Ï´βéÔÄ
1. ¹ØÓÚtermµÄÎÊÌ⣬ Èç¹ûÏÓ°²×°µÄterm²»¹»pp£¬¿ÉÒÔʹÓÃputty£¬ÄǾÍÐèÒª°²×°openssh°ü£¬ÒÔ±ã¿ÉÒÔʹÓÃputty£¬
opensshµÄ°²×°¹ý³Ì²ÎÔÄhttp://pigtail.net/LRP/printsrv/cygwin-sshd.html ÀïÃæ½éÉܵĺÜÏêϸ¡£ÏÂÃæÌô¼¸¸ö¹Ø¼üµã¼Ç¼ÈçÏ£º
(2b) Download ......
LinuxÖն˻·¾³Ï£¬ÀûÓÃÖÕ¶ËÃüÁîÐòÁпÉÒÔÉèÖÃ×ÖÌåµÄÑÕÉ«£¬Æä¸ñʽÈçÏ£º
<ESC>[<C1>;<C2>;<C3>m
ÆäÖÐ<ESC>µÄֵΪ ......
<1> ÈÎÎñ0µÄ¶ÑÕ»ÎÊÌâ
Ò»Ö±²»Ã÷°×schedule.cÀïµÄtask_unionµÄstackºÍuser_stackÊÇʲô¹Øϵ£¬head.sÀï¾ÍÉèÖÃÁËespÖ¸Ïòuser_stack, ȴһֱûÓÐÓõ½task_union£¬Ö±µ½¿´µ½INIT_TASK²ÅÃ÷°×£¬´Ó½øÈë±£»¤Ä£Ê½µ½Ìøת½øÓû§Ì¬¶¼ÊÇÓõÄuser_stackÕâ¸öÕ»£¬¶øÈÎÎñ0µÄtssÖеÄesp0Ö¸Ïòtask_unionµÄstack, Ò²¾ÍÊǵ±ÈÎÎñ0ÔÙÌøת½øÄÚºË ......
2010Äê05ÔÂ1ºÅ |
23:15·ÖÀࣺ¹ÜÀíά»¤
, Õï¶Ï°¸Àý
| ±à¼
| ±êÇ©£º11g
¡¢dbca
¡¢netca
| 13
views
±¾Îijö×Ô “inthirties£¨ÄÐ
ÈËÈýÊ®£©
”²©¿Í£¬×ªÔØÇëÎñ±Ø×¢Ã÷×÷Õߺͱ£Áô³ö´¦¡£
¿Í»§×°ºÃÁËOracle£¬°²×°³É¹¦ÁË£ ......