#include int main() { setvbuf(stdout,NULL,_IONBF,0); /* FILE *f=fopen("~testpipe","rw"); int pid=_fork(); if(pid==0) { char buf[2]; fread(buf,1,1,f); printf("[%c]\n",buf[0]); while(1); } else { char buf[]="666"; fwrite(buf,1,1,f); printf("written\n"); while(1); } */ int f=_open("~testpipe","RW"); int pid=_fork(); if(pid==0) { char buf[2]; while(_read(f,buf,1))printf("%c",buf[0]); } else { char buf[]="666 the number of the beast"; _write(f,buf,27); printf("written\n"); } }