On Tue, 23 Mar 2004, Linux User wrote:
while(n = read(fd,buff,sizeof(buff)) > 0){
should be:
while( (n = read(fd,buff,sizeof(buff))) > 0){
notice the extra parentheses. You were assigning the result of read > 0 to n. As long as read > 0, (read > 0) evaluates to 1.