![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IPC通信
我想买MacBook
安卓开发初学者
展开
-
在Linux环境中通过共享内存方式进行进程间通信
#include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<signal.h> #include<sys/ipc.h> #include<sys/msg.h> #include<sys/shm.h> char *addr; //客户端发送消息 void client(){ //申请共享内存,shmget函数的具体意思自行百度 int s原创 2021-05-16 22:22:09 · 80 阅读 · 0 评论 -
在Linux环境中利用消息队列进行进程间的通信
#include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<signal.h> #include<sys/ipc.h> #include<sys/msg.h> //用于装载消息的结构体 struct msgbuf{ long mtype;//消息类型 char mtext[1];//消息正文 }; //定义一个结构体 struct msg原创 2021-05-16 20:57:26 · 107 阅读 · 0 评论