3 #include <be/kernel/OS.h>
5 int main(int argc, char **argv)
9 sem1=create_sem(1,"piperun");
10 sem2=create_sem(1,"piperun");
11 if (sem1<B_NO_ERROR ||sem2<B_NO_ERROR) {
19 fd1=open("/pipe/1",O_WRONLY|O_CREAT,0666);
21 perror("writer: /pipe/1");
25 /* wait for other side to open the pipe 1 */
27 /* wait for creation of pipe 2 */
29 fd2=open("/pipe/2",O_RDONLY);
42 fd1=open("/pipe/1",O_RDONLY);
48 fd2=open("/pipe/2",O_WRONLY|O_CREAT,0666);
50 perror("writer: /pipe/2");
54 /* wait for child to open ... */