![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
文章平均质量分 64
frankliuhome
这个作者很懒,什么都没留下…
展开
-
Linux IPC - FIFO
1. Create a FIFO umask (0); mknod("/tmp/MYFIFO", S_IFIFO|0666, 0);2. Open a FIFO fd = open ("/tmp/MYFIFO", O_WRONLY); fd = open ("tmp/MYFIFO", O_RDONLY|O_NDELAY);3. Read/Write FIF原创 2007-03-09 11:38:00 · 497 阅读 · 0 评论 -
Linux IPC - PIPE
1. Create PIPE int handle[2]; int ret; ret = pipe(handle); /*handle[0] : read descriptor, handle[1]: write descriptor*/ if (ret { fprintf(stderr, "pipe error"); }2. Set PI原创 2007-03-09 11:01:00 · 882 阅读 · 0 评论 -
Linux IPC - Message Queue
1. Create IPC Facility Key key_t mykey;mykey = ftok(".", a); 2. Create Message Queue qid = msgget(mykey, 0600 | IPC_CREATE); 3. Receive/Send Message msgrcv(qid, buf, len原创 2007-03-09 12:07:00 · 1102 阅读 · 0 评论 -
Linux IPC - Shared memory
1. Create shared memory int shmget(key_t key, int size, int shmflg); if ((shm_id = shmget (mykey, sizeof (struct sharedbuf), 0600 | IFLAGS)) perror ("shmget");2. Attach shared mem原创 2007-03-09 14:41:00 · 900 阅读 · 0 评论