2014年12月30日
摘要: #include "stdio.h"#include "string.h"#include "unistd.h"#include "sys/shm.h"int main(){ int id = shmget(0x8888, 100, IPC_CREAT|0644); if (id==-1) {... 阅读全文
posted @ 2014-12-30 16:23 张武亮 阅读(240) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "sys/socket.h"#include "unistd.h"int main(){ int s[2]; socketpair(AF_LOCAL, SOCK_STREAM, 0, s); int n; char buf[100]; ... 阅读全文
posted @ 2014-12-30 16:23 张武亮 阅读(245) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "unistd.h"#include "pthread.h"void *func(void *p){ *(int*)p=200; int i; for (i=0; i<20; i++) { write(1, ".", 1); ... 阅读全文
posted @ 2014-12-30 16:22 张武亮 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 介绍:od(octal dump)命令可以以八进制、十进制、十六进制和ASCII码来显示文件或者流,它们对于访问或可视地检查文件中不能直接显示在终端上的字符很有用。语法:od [-A 地址进制] [-t 显示格式] 文件选项介绍:-A 地址进制: 按指定的进制显示地址信息;-t 显示格式: 指定数据... 阅读全文
posted @ 2014-12-30 10:04 张武亮 阅读(1534) 评论(0) 推荐(0) 编辑