摘要: 曾经觉得费解,温故知新一下:/*g++ -o New0001 New0001.cpp */#include <stdio.h>#include <sys/wait.h>#include <sys/types.h>#include <unistd.h>int main(void){ pid_t pid; if ((pid = fork()) < 0) { fprintf(stderr,"Fork error!\n"); exit(-1); } else if (pid == 0) /* first child */ { i 阅读全文
posted @ 2011-06-17 05:47 大熊猫 阅读(507) 评论(0) 推荐(0) 编辑