linux ¼¸ÖÖIPCÀý×Ó×ܽá
1.¹ÜµÀ
1.1ÆÕͨ¹ÜµÀ
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
int main()
{
int pipe_fd[2];
pid_t pid;
char buf_r[100];
char *p_wbuf;
int r_num;
memset(buf_r, 0, sizeof(buf_r));
if(pipe(pipe_fd) < 0)
{
printf("pipe create error!\n");
return -1;
}
if((pid = fork()) == 0)
{
printf("\n");
close(pipe_fd[1]);
sleep(2);
if((r_num = read(pipe_fd[0], buf_r, 100)) > 0)
{
printf("%d numbers read from the pipe is %s\n", r_num, buf_r);
}
close(pipe_fd[0]);
exit(0);
}
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
½øÈëviºó ÓÐÁ½ÖÖģʽ
1.±à¼Ä£Ê½
2.ÃüÁîģʽ
½øÈëviºóĬÈÏÊÇÃüÁîģʽ£¬ËùÒÔ²»ÒªÂÒ°´ ¾Í»áµÃµ½ddµÄ¾¯¸æÉù£¬ÒªÊäÈëÎÄ×ֵĻ° Çë°´aºói ¾Í¿ÉÒÔ¿ªÊ¼ÊäÈëÎÄ×ÖÀ£¡
ÊäÈë½áÊøºó Çë°´esc¼ü»ØÃüÁîģʽ
ÊäÈëq¾ÍÊÇÍ˳ö
ÊäÈëwq¾ÍÊÇ´æÅ̺óÍ˳ö
ÊäÈëq!·ÅÆú´æÅÌÇ¿ÐÐÍ˳ö
.
Vi µÄʹÓÃ
Vi ÒѾÊÇ Unix ϵͳÖбê×¼µÄÎÄ×Ö±à¼Æ ......
ÔÚlinux ÖУ¬ÊäÈëviʱºò£¬Æäʵ¾ÍÊÇÔÚµ÷ÓÃvimÁË;
ubuntuÖУ¬vi´ò¿ªÒ»¸öº¬ÖÐÎĵÄÎļþ£¬Èç.fcitx/configÎļþ£¬Ä¬ÈÏÏÔʾÂÒÂ룬½â¾ö·½·¨£º
1)¶ÔËùÓÐÓû§¶¼ÓÐЧ,½â¾öϵͳÖÐËùÓÃÓû§µÄviÖÐÎÄÂÒÂëÎÊÌâ
sudo /etc/vim/vimrc.tiny »ò/etc/vimrc
¼ÓÈëÈçÏÂÄÚÈÝ£º
#Ìṩһ¸öʵ¼ùÖо ......
ÆäʵÕâ¸öÒ²¿ÉÒÔÊÓΪÏÂÔØÐèÒªvodplayer»òÕß½Ð×ö±¦Àûͨ²¥·ÅÆ÷²ÅÄܹۿ´µÄÔÚÏßµçÓ°µÄÒ»¸ö½â¾ö·½°¸¡£
±¦ÀöͨÊÓƵµã²¥·þÎñÓÃÔÚÐí¶à¿í´ø·þÎñÉÏ¡£ËٶȽϿ죬µ«ÊDZØÐëʹÓÃÆäÌض¨µÄ²¥·ÅÆ÷vodplayer²ÅÄܲ¥·Å¡£¶øÕâ¸öÈí¼þÖ»ÓÐwindowsƽ̨Éϵİ汾¡£ÔÚlinux»òÕßmacÎÞ·¨Ê¹Óᣳý·Ç×°ÐéÄâ»ú¡£ÄÇÌ«Âé·³¡£
ÏÖÔÚÌṩһ¸ö½â¾ö·½°¸£¬ÆäÔÀíÈçÏ ......