what is n declared as ?
--- Linux User metempsychosist@yahoo.com wrote:
nope!!! my code is like this
void foo(void){
char buff[4096]; ....
n = read(fd,buff,sizeof(buff));
}
the file descriptor "fd" is the same one that was used to download. now all that i am doing is reading from it again to copy. i tried to close fd, and then reopen the file to copy... but it always copies 1 byte at a time. whats happening
--- Philip S Tellis philip.tellis@gmx.net wrote:
On Mon, 22 Mar 2004, Linux User wrote:
Now when i copy...i.e when i try to read from this downloaded file
n = read(fd,buff,sizeof(buff)); n is always 1
where is buff declared? what is it declared as?
do you have code like this:
char buff[1024];
foo(buff);
void foo(char *buff) { n=read(fd, buff, sizeof(buff)); }
Philip
-- Acting is an art which consists of keeping the audience from coughing.
--
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers
Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html
__________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html