作者:QueenieYam任嘉明 | 来源:互联网 | 2023-05-17 23:52
main() {
int fd1[2],fd2[2];
pipe(fd1);
pipe(fd2);
fork();
fork();
}
How many read or write file descriptors will be there in total in the above code? How many pipes would be created in total? What all data will be copied on to the child processes from their respective parent processes? Please explain the working of the program too.
上面的代码中总共会有多少个读写文件描述符?总共会创建多少个管道?什么所有数据将从各自的父进程复制到子进程?请解释一下该程序的工作原理。
1 个解决方案