随笔分类 -  *nix

摘要:1 #include <unistd.h>; 2 #include <sys/types.h>; 3 4 main () 5 { 6 pid_t pid; 7 pid=fork(); // 这个地方开始分化为两个进程空间(所谓的一次调用,两个返回) 8 9 if (pid < 0)10 printf("error in fork!");11 else if (pid == 0)12 printf("i am the child process, m... 阅读全文
posted @ 2012-08-26 15:49 持幕 阅读(133) 评论(0) 推荐(0)