![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
操作系统实验
(ノ"◑ڡ◑)ノ
这个作者很懒,什么都没留下…
展开
-
2021-04-24
#include<stdio.h> #include <unistd.h> int main(){ int fd[2]; int pp = pipe(fd); int p1=1,i; p1 = fork(); if(p1==0){ close(fd[0]); sleep(10); write(fd[1],"Child 1 is sending a message!",strlen("Child 1 is sending a message!")); }e原创 2021-04-24 16:28:08 · 66 阅读 · 0 评论 -
2021-04-24
#include<stdio.h> #include <unistd.h> int main(){ int p1=1,i; p1 = fork(); if(p1==0){ printf("b\n"); printf("b begin!\n"); for(i=0;i<100;i++) printf("son!\n"); printf("b end!\n"); }else{ printf("a\n"); printf("a begin!\n");原创 2021-04-24 16:06:52 · 74 阅读 · 0 评论