From owner-freebsd-questions Fri Oct 16 12:17:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA19437 for freebsd-questions-outgoing; Fri, 16 Oct 1998 12:17:43 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA19430 for ; Fri, 16 Oct 1998 12:17:39 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.8/8.8.8) with ESMTP id MAA02434; Fri, 16 Oct 1998 12:17:14 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 16 Oct 1998 12:17:14 -0700 (PDT) From: Doug White To: Geoffrey Robinson cc: questions@FreeBSD.ORG Subject: Re: Interrupted System Calls Infinite Loop In-Reply-To: <3622B97D.C04E46C2@globalserve.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 12 Oct 1998, Geoffrey Robinson wrote: > error_handle = fread(&sizerec,1,sizeof(struct size_record),fp2); Um, I think your 2nd and 3rd arguments are reversed. Trying to read sizeof(struct size_record), 1 byte objects? Don't you mean: fread(&sizerec, sizeof(struct size_record),1,fp2); to read one record? Ye Olde Fread(3) says: SYNOPSIS fread(void *ptr, size_t size, size_t nmemb, FILE *stream) DESCRIPTION The function fread() reads nmemb objects, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message