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

Linux³ÌʽÉè¼Æ

 
http://www.openchess.org/noitatsko/programming/ (2001-05-24 16:47:48)
ÐźŴ¦Àí
--------------------------------------------------------------------------------
ÐźŴ¦Àí¸Å˵ 
ËͳöÐźŠ
½ÓÊÕÐźŠ
ÐźŵĴ¦Àí 
ÈÎÎñ¿ØÖÆ 
--------------------------------------------------------------------------------
POSIX IPC 
reliable/unreliable 
reentrant 
pending 
sending signals 
catching signals 
manipulating 
signal definitions 
--------------------------------------------------------------------------------
ÐźÅsingals
ÐźŵĴ¦Àí¿ÉÒÔÓÃÒ»´óÕÂÀ´Ð´£¬Éæ¼°µÄ²ãÃæÒ²»áÉîÈëÕû¸ö×÷ҵϵͳÖУ¬ÎÒ²¢²»´òËãÕâÑù×ö£¬ÒòΪÄú¿ÉÄÜ»áÔ½¸ãÔ½ÃÔºý¡£ÕâÀïÎÒÖ»¸æËßÄúÈçºÎ½ÓÉÏÐźţ¬ÔÚʵÓõIJãÃæÉÏ£¬ÕâÑù±ãºÜ¹»ÓÃÁË¡£Äú¿ÉÒÔÏÈÀûÓÃÕâЩ»ù±¾µÄ¼¼ÇÉÀ´×«Ð´³Ìʽ£¬µÈµ½ÓнøÒ»²½¸ßµÈÓ¦ÓõÄÐèҪʱ£¬ÕÒÒ»±¾½ÏÉîÈëµÄUNIX Programming½Ì²Ä£¬×¨ÃÅÑо¿signalµÄд·¨¡£ 
Ò»°ã¼òµ¥µÄsignalд·¨ÈçÏÂ: 
void mysignal(int signo) 

  /* my signal handler */ 

void initsignal(void) 

  struct sigaction act; 
  act.sa_handler = mysignal; 
  act.sa_flags   = 0; 
  sigemptyset(&act.sa_mask); 
  sigaction(SIGHUP,&act,NULL); 
  sigaction(SIGINT,&act,NULL); 
  sigaction(SIGQUIT,&act,NULL); 
  sigaction(SIGILL,&act,NULL); 
  sigaction(SIGTERM,&act,NULL); 

  
ÀýÒ»: lock.c
ÔÚforkµÄÀýÈýÖÐÌáµ½£¬ÔÚdaemon±»É±µôʱ£¬ÐèÒªÔÚÀ뿪ǰ£¬½«/var/run/lock.pidɾ³ý¡£ÕâÀïÎÒÃÇ¿ÉÒÔÀûÓÃsignalÀ´´¦ÀíÕâ¼þÊ¡£ 
#include
#include
#include
#include
#define LOCK_FILE "/var/run/lock.pid"
void quit(int signo)
{
printf("Receive signal %d\n",signo);
unlink(LOCK_FILE);
exit


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Windows ³ÌÐòÒÆÖ²µ½Linuxƽ̨µÄÒ»²¨NÕÛ

 ±¾ÈËÇ°¶Ëʱ¼äдÁ˸öHTMLÎļþ·ÖÎöÆ÷£¬windowsƽ̨ÉϵÄVC6.0£¬Ê¹Óñê×¼C++¡£×òÌì½Óµ½Ö¸ÁӦҪÇóÒª·¢²¼Ò»¸öLinux°æ±¾µÄ£¬Ã£È»À²£¬LinuxÏÂÃæµÄhello world¶¼Ã»ÓÐÍæ¹ý£¬¶ÔlinuxϵÄC++³ÌÐò½ö½öÏÞÓÚÌýËûÃÇÉñ´µ¹ýµÄGCC, G++, MAKEFILEʲôµÄ£¬ÆäËûÒ»¸Å²»Öª¡£Õâ¾Í×¢¶¨ÒÆÖ²¹ý³Ì±ØÈ»full of frustrating.
ÔçÉÏÔÚÈçͬä¸ä¸ÏªÁ÷ ......

Linux ´´½¨Îļþϵͳ¼°¹ÒÔØÎļþϵͳÁ÷³ÌÏê½â

 ×÷Õߣº±±ÄÏÄϱ±
À´×Ô£º LinuxSir.Org
ÕªÒª£º±¾ÎĶÔÐÂÔöÓ²ÅÌ£¬ÇиîÓ²ÅÌ£¬´´½¨Ó²ÅÌ·ÖÇø£¬ÎªÓ²ÅÌ·ÖÇø´´½¨Îļþϵͳ£¬ÒÔ¼°¼ÓÔØÎļþϵͳµÄÁ÷³Ì×ö×ܽáÐÔÂÛÊö£»Ö÷ÒªÊÇΪ³õѧÕßŪÇå³þÕâÒ»²Ù×÷¹ý³Ì£»±¾ÎÄ
Éæ¼°fdisk¡¢mkfs¡¢mount ... ... µÈ¹¤¾ß£»¶Ô/etc/fstab ½øÐÐÁ˽â˵£»»¹ÓдÅÅÌɨÃ蹤¾ßfsck µÈ½éÉÜ£»
++++++++++++++++ ......

/etc/sysconfig/i18n linuxÂÒÂëÎÊÌâ...

/etc/sysconfig/i18n
±à¼­/etc/sysconfig/i18nÕâ¸öÎļþ£¬
²»¹ÜÄã×°µÄÊÇÖÐÎÄ°æ,»¹ÊÇÓ¢ÎÄ°æ.ɾµôÔ­À´µÄÅäÖÃ,°ÑÏÂÃæµÄ¿½±´¹ýÈ¥
LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"
±£´æ,ÖØÆð.OKÁË
×¢:
I18N ÊÇ internationalization µÄËõдÐÎʽ£¬Òâ¼´ÔÚ i ºÍ ......

linuxϱàÒëÔËÐеĵÚÒ»¸öC

linuxÏÂÔËÐеĵÚÒ»¸öC³ÌÐò
root@localhost root]# vi hello.c
½øÈëvimµÄÃüÁîģʽ£¬°´Ï¼üÅ̵ÄiÇл»µ½²åÈëģʽ£¬ÊäÈëÈçÏ´úÂ룺
#include  <stdio.h>
int main()
{
        printf("Hello! This is our embeded world!\n");
        return ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ