linuxÄں˺¯Êý±Ê¼Ç(Ò»)
½ø³Ì¹ÜÀíº¯Êý
pid_t getpid();·µ»Øµ±Ç°½ø³ÌµÄ±êʶºÅPID
pid_t fork();´´½¨Ò»¸ö½ø³Ì¡£
pid_t vfork();Óëfork()ÏàËÆ£¬vfork±£Ö¤×Ó½ø³ÌÏÈÔËÐУ¬ÔÚËüµ÷ÓÃexec»òexitÖ®ºó¸¸½ø³Ì²Å¿ÉÄܱ»µ÷Óá£
execº¯Êý×壺ÓÃÓÚ°ÑÒ»¸öгÌÐòÔØÈëµ÷Óýø³ÌµÄÄÚ´æ¿Õ¼ä£¬À´¸Ä±ä½ø³ÌµÄÖ´ÐдúÂ룬´Ó¶øÐγÉнø³Ì¡£execve²ÅÊÇÕæÕýÒâÒåÉϵÄϵͳµ÷
Óã¬ÆäËûµÄ¶¼ÊÇÔÚ´Ë»ù´¡ÉϵĿ⺯Êý¡£
int execl(const char *path,const char *arg,...);
int execv(const char *path,char *const argv[]);
int execle(const char *path,const char *arg,...,char *const envp[]);
int execve(const char *path,char *const argv[],char *const envp[]);
int execlp(const char *file,const char *arg,...);
int execvp(const char *file,char *const argv[]);
pid_t wait(int *status);ΪÁËʵÏÖ½ø³Ì¼äµÄͬ²½£¬Èýø³Ì½øÈëÐÝÃß״̬£¬ÖªµÀ±»»½ÐÑ¡£
pid_t waitpid(pid_t pid,int *status,int options);ÓëwaitÏàËÆ£¬µ«Çø±ðÊÇËüÒªµÈ´ýÖ¸¶¨µÄpid½ø³ÌÍ˳ö¡£
options:WNOHANG,ÒªÇóÈç¹ûûÓÐ×Ó½ø³ÌÍ˳ö¾ÍÁ¢¼´·µ»Ø¡£
WUNTRACED£¬¶ÔÒѾֹͣµ«±¾²»Óñ¨¸æ״̬µÄ×Ó½ø³Ì£¬¸Ãµ÷ÓÃÒ²´ÓµÈ´ýÖзµ»Ø²¢±¨¸æ״̬¡£
unsigned int sleep(unsigned int seconds);ʹ½ø³Ì¹ÒÆðÖ¸¶¨µÄʱ¼ä¡£
clock_k times(struct tms *buf);»ñÈ¡µ±Ç°½ø³ÌµÄʱ¼äÐÅÏ¢¡£
exit()ºÍ_exit()
void _exit(int status);Ö±½Óʹ½ø³ÌÍ£Ö¹ÔËÐУ¬Çå³ýÆäÔÚʹÓõÄÄÚ´æ¿Õ¼ä£¬²¢Ïú»ÙÆäÔÚÄÚºËÖеĸ÷ÖÖÊý¾Ý½á¹¹
exitÔÚ´Ë»ù´¡ÉϼÓÁËÆäËûһЩ¹¤Ðò£º¼ì²éÎļþ´ò¿ªÇé¿ö£¬°ÑÎļþ»º³åÇøÖеÄÄÚÈÝд»ØÎļþ¡£
Îļþ²Ù×÷º¯Êý
int open(const char *pathname,int flags);
int open(const char *pathname,int flags,...,mode_t mode);
int create(const char *pathname,mode_t mode);
int close(int filedes);
size_t read(int filedes,void *buff,size_t nbytes);
ssize_t write(int filedes,void *buff,size_t nbytes);
off_t lseek(int filedes,off_t offset,int whence);
int dup(int oldfd);¸´ÖÆÒ»¸öÏÖ´æµÄÎļþÃèÊö·û
int dup2(int oldfd,int newfd);ͬÉÏ
int ioctl(int d,int request,...);ÓÃÀ´¿ØÖÆÉ豸
ÎļþÊôÐÔ
int access(const char *pathname,int mode);»ñµÃÓû§¶ÔÎļþµÄ·ÃÎÊÐí¿É
int stat(const char *file_name,struct stat *buf);»ñÈ¡Îļþ״̬ÐÅÏ¢
int f
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
1.# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=yourname £¨ÔÚÕâÐÞ¸Ähostname£¬°Ñyourname»»³ÉÄãÏëÓõÄÃû×Ö£©
NISDOMAIN=eng-cn.platform.com
2.ÐÞ¸Ä/etc/hostsÀïÃæµÄÃû×Ö
££ vi /etc/hosts
127.0.0.1 localhost.localdomain localhost £¨ÔÚÕâÐÞ¸Ähostname£¬°ÑĩβµÄlocalhost»»³ÉÄãÏëÓõÄÃû×Ö£©
&nbs ......
1. ps¼ò½é
psÃüÁî¾ÍÊÇ×î»ù±¾Í¬Ê±Ò²ÊǷdz£Ç¿´óµÄ½ø³Ì²é¿´ÃüÁî.ʹÓøÃÃüÁî¿ÉÒÔÈ·¶¨ÓÐÄÄЩ½ø³ÌÕýÔÚÔËÐкÍÔËÐеÄ״̬¡¢½ø³ÌÊÇ·ñ½áÊø¡¢½ø³ÌÓÐûÓн©ËÀ¡¢ÄÄЩ½ø³ÌÕ¼ÓÃÁ˹ý¶àµÄ×ÊÔ´µÈµÈ.×ÜÖ®´ó²¿·ÖÐÅÏ¢¶¼ÊÇ¿ÉÒÔͨ¹ýÖ´ÐиÃÃüÁîµÃµ½µÄ.
2. psÃüÁî¼°Æä²ÎÊý
psÃüÁî×î³£ÓõĻ¹ÊÇÓÃÓÚ¼à¿Øºǫ́½ø³ÌµÄ¹¤×÷Çé¿ö,ÒòΪºǫ́½ø³ÌÊDz»ºÍÆÁÄ»¼ü ......