摘要:
1 #include 2 #include 3 4 #define m 6 5 int main() 6 { 7 int pipefd[2]; 8 int pid; 9 int m1;10 11 if(pipe(pipefd)0) //parent18 {19 m1=m;20 close(pipefd[0]); //close read end21 write(pipefd[1],&m1,sizeof(int)); //read m122 wait(NULL); // wait for child complete23 close(pipefd[1]);24 }25 else if(p 阅读全文