All pastes #270582 Raw Edit

Something

public text v1 · immutable
·published 2006-12-07 14:46 UTC
rendered paste body
#include<stdio.h>
#include<sys/types.h>
#include<fcntl.h>
#include<sys/stat.h>

#define  BUFF  100

int main()
{

 int fd1,fd2,n;
 char buf[1000],filename[100],recv[100];
mknod("fifo1",S_IFIFO|0666 ,0);
mknod("fifo2",S_IFIFO|0666 ,0);
printf("client online ");
printf("enter the path : ");
scanf("%s",&filename);
fd1=open("fifo1",O_WRONLY);
write(fd1,filename,strlen(filename));
fd2=open("fifo2",O_RDONLY);
if((n=read(fd2,recv,300))==-1)
printf("error");
while(1)
{
write(1,recv,sizeof(recv));
}
}