2013年8月22日
摘要: 源码书上关于进程间通过共享内存实现通信的例子。遇到了问题操作过程中,一直提示 shmat error, 很纳闷。解决调试了很长时间,突然想起shmat会将错误原因存于error中,所以在源代码中加了一句 printf("%s\n", sys_errlist[errno]); 运行结果显示 Permission denied. 原来是没有权限,运行时 加上 sudo , OK。解决.代码如下m1.c#include #include #include #include #include #include #include #define BUF_SIZE 1024#defin 阅读全文
posted @ 2013-08-22 15:17 Still_Raining 阅读(309) 评论(2) 推荐(0) 编辑