From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,5050bbe275e896ef X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-01-24 10:48:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Message-ID: <3E318A7E.53D33732@hp.com> From: Brian Haley X-Mailer: Mozilla 4.79 [en] (X11; U; OSF1 V5.1 alpha) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Tru64 5.1A (and B) socket bug References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 24 Jan 2003 13:48:30 -0500 NNTP-Posting-Host: 16.140.64.151 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 1043434111 16.140.64.151 (Fri, 24 Jan 2003 10:48:31 PST) NNTP-Posting-Date: Fri, 24 Jan 2003 10:48:31 PST Organization: Hewlett-Packard Company Xref: archiver1.google.com comp.unix.tru64:9448 Kevin Layer wrote: > > Anyone else run into this problem? We upgraded to 5.1B to see if it > was fixed, and it is not. > > A C program to demonstrate the problem is below. I had to modify this program to get it to work: # diff -c bug.c bug2.c *** 137,151 **** { toread = (len > 4096? 4096 : len); ! if ((got= read(s,buffer+i,toread)) != toread) { printf("Wanted to read %d, got %d, errno = %d\n", toread, got, errno); exit(1); } ! len -= toread; ! i += toread; } /* now get eof */ if ((got=read(s,buffer,4096)) != 0) { --- 142,157 ---- { toread = (len > 4096? 4096 : len); ! if ((got = read(s,buffer+i,toread)) < 0) { printf("Wanted to read %d, got %d, errno = %d\n", toread, got, errno); exit(1); } ! len -= got; ! i += got; } /* now get eof */ if ((got=read(s,buffer,4096)) != 0) { read() isn't guaranteed to always return what you ask for. I'll forward this on to someone else here more familiar with that code, but to make sure your problem is addressed you should call the support center and file a formal problem report. -Brian Haley, Tru64 Unix Networking