[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: read system call.
Lakshmi Gopinath molested the spacetime to project in our dimension:
> if (fd = (open("/root/data",O_RDONLY,0) < 0))
this line should be if((fd=open("/root/data",O_RDONLY))<0)
your brackets are misplaced :-)
> printf("\n %s",strerror(errno));
this would need string.h and so would strerror
> while(count = (read(fd,buff,sizeof(buff))) > 0)
> printf("\n %s ",buff);
> printf("\n %d",count);
Hope this works now
"That's the problem with nature, something's always stinging you
or oozing mucous all over you. Let's go and watch TV."