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

Linux Ϲ²ÏíÄڴ潨Á¢Ê±ÐèҪעÒâµÄÎÊÌâ

ÔÚlinuxÏÂʹÓù²ÏíÄÚ´æʱ£¬ÕÕ×ÅÊéÉÏ»òÕßÍøÉϵķ½·¨£¬Ê¹ÓÃshmatº¯Êýʱ£¬ÀÏÊÇ»áÅöµ½Ò»¸öÎÊÌâ
Ìáʾ:
shmat error
permission denied
ÿ´ÎÐèÒªsudoһϲÅÄܹ»Õý³£ÔËÐУ¬²¢ÇÒÈç¹ûÆÕͨÓû§Ê¹ÓÃipcs²é¿´µÄ»°£¬ÊÇ¿´²»¼ûÒѾ­·ÖÅäµÄ¹²ÏíÄÚ´æµÄ£¬ÐèÒªÔÚrootÓû§Ï²ÅÄÜ¿´¼û£¬ ×ʼÒÔΪÊÇshmatÐèÒªrootÓû§µÄȨÏÞ£¬ºóÀ´·¢ÏÖ²»ÊÇÕâÑù¡£
Ôì³ÉÕâ¸öÎÊÌâµÄ³ÉÒòÊÇÔÚʹÓÃshgetµÄʱºò£¬Ã»Óи³ÓÚ¿ª±ÙµÄ¹²ÏíÄÚ´æ¶ÔÓ¦µÄ¶ÁдȨÏÞ¡£
shgetº¯ÊýÔ­ÐÍÈçÏÂ
int shmget( key_t shmkey , int shmsiz , int flag );
×¢Òâ×îºóÒ»¸öÐβΠflag£¬±íʾµ±Ç°ÄÚ´æµÄģʽ
(mode)ÒÔ¼°È¨ÏÞ±êʶ¡£
¿ÉÒÔÈ¡ÈçϵÄÖµ
ģʽ¿ÉÈ¡ÈçÏÂÖµ£º н¨£ºIPC_CREAT
Èç¹û±êʶ·ûÒÔ´æÔÚ£¬Ôò·µ»Ø´íÎóÖµ£ºIPC_EXCL
È»ºó½«“ģʽ” ºÍ“ȨÏÞ±êʶ”½øÐГ»ò”ÔËË㣬×öΪµÚÈý¸ö²ÎÊý¡£
È磺 IPC_CREAT | IPC_EXCL | 0666
¼´
shmid = shmget( shmkey , sizeof(in_data) , IPC_CREAT |
0666 ) ;
ÕâÑù£¬Ò»ÇÐok. ²»ÐèÒªrootȨÏÞ£¬ÓÃipcsÒ²ÄÜ¿´µ½µ±Ç°Óû§½¨Á¢µÄ¹²ÏíÄÚ´æÐÅÏ¢


Ïà¹ØÎĵµ£º

Cov++ÔÚLinuxϼòµ¥Ê¹Óà Èí¼þ¸²¸ÇÂʹ¤¾ß


Covtool
ÊÇÒ»¸öÓöÔ
C++
´úÂë½øÐÐÔËÐÐʱ¸²¸ÇÂʼì²éµÄ¹¤¾ß£¬¿ÉÒÔÒÔÐÐΪµ¥Î»¼ì²é³öÄÇЩ´úÂëÔÚÔËÐÐÖб»Ê¹Óã¬ÄÇЩûÓÐʹÓá£
1.      
°²×°
make
make tests
make install
½«
/usr/local/covtool
Ìí¼Óµ½
PATH
½«
/usr/local/covtools
Ìí¼Óµ½
MANPATH£¨´Ë²½ºÜÖØÒª£¬ËüµÄman±ÈÎ ......

LINUX C ʱ¼ä²Ù×÷

  1.ʱ¼ä±íʾ
    ÔÚ³ÌÐòµ±ÖÐ,ÎÒÃǾ­³£ÒªÊä³öϵͳµ±Ç°µÄʱ¼ä,±ÈÈçÎÒÃÇʹÓÃdateÃüÁîµÄÊä³ö½á¹û.Õâ¸öʱºòÎÒÃÇ¿ÉÒÔʹÓÃÏÂÃæÁ½¸öº¯Êý:
#include <sys/time.h>
time_t time(time_t *tloc);
char *ctime(const time_t *clock);
    timeº¯Êý·µ»Ø´Ó1970Äê1ÔÂ1ÈÕ0 ......

Linux PPP Êý¾ÝÊÕ·¢Á÷³Ì

Linux PPP Êý¾ÝÊÕ·¢Á÷³Ì
                      
תÔØʱÇë×¢Ã÷³ö´¦ºÍ×÷ÕßÁªÏµ·½Ê½£ºhttp://blog.csdn.net/absurd
×÷ÕßÁªÏµ·½Ê½£ºÀîÏȾ²<xianjimli at hotmail dot com>
¸üÐÂʱ¼ä£º2007-5-4
&nb ......

ubuntu linux ppp ²¦ºÅ GPRS

Ò» Ê×ÏÈ°²×°ppp£¬ ÓÃsudo apt-get install ppp
¶þ ²¦ºÅÉÏÍø£¬ Ò»¹²ÓÐ3ÖÖ·½Ê½
1.ʹÓÃÃüÁî pppd call somescript µÄ·½Ê½
- ÔÚ /etc/pppĿ¼Ï£¬½¨Á¢3¸öÎļþ£ºpap-secrets,chap-secrets,gprs-connect-chat
  ºÍÒ»¸öĿ¼:peers
  ÔÚpeersĿ¼Ï½¨Á¢Ò»¸öÎļþgprs
Õâ4¸öÎļþµÄÄÚÈÝÈçÏ£º
---------------------- ......

linux ¶¨Ê±ÈÎÎñ crontabµÄÓ÷¨

crontabµÄÓ÷¨---linux¶¨Ê±ÈÎÎñ
2008Äê07ÔÂ30ÈÕ ÐÇÆÚÈý ÏÂÎç 01:00
crontabµÄÓ÷¨---linux¶¨Ê±ÈÎÎñ
Step 1:
    ʹÓÃÃüÁîcrontab
-e±à¼­Ò»¸ö¶¨Ê±Ö´ÐеÄÈÎÎñ»òÔÚ/var/spool/cron/crontabsĿ¼ÏÂн¨Ò»¸öÓë×Ô¼ºÓû§ÃûÏàͬµÄÈÎÎñ.
    ¼´:
   
#ÿ¸ôÒ»·ÖÖÓÖ´ÐÐÒ»´Îº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ