进程1创建共享文件 代码 #include <sys/ipc.h> #include <sys/types.h> #include <sys/shm.h> #include <stdio.h> #include <string.h> #include <unistd.h> //int shmget(key_t key, size_t size, int shmflg); int main() { char *shmaddr; key_t key; key = ftok(".", 1