From owner-freebsd-questions Wed Jul 14 22:43: 4 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cr31617-a.lndn1.on.wave.home.com (cr31617-a.lndn1.on.wave.home.com [24.112.227.163]) by hub.freebsd.org (Postfix) with ESMTP id 2393414FA2 for ; Wed, 14 Jul 1999 22:42:56 -0700 (PDT) (envelope-from jbailie@cr31617-a.lndn1.on.wave.home.com) Received: (from jbailie@localhost) by cr31617-a.lndn1.on.wave.home.com (8.9.3/8.9.3) id BAA03346 for freebsd-questions@freebsd.org; Thu, 15 Jul 1999 01:30:23 -0400 (EDT) (envelope-from jbailie) Date: Thu, 15 Jul 1999 01:30:23 -0400 From: James Bailie To: freebsd-questions@freebsd.org Subject: fseek() over bounds of file Message-ID: <19990715013023.A3264@cr31617-a.lndn1.on.wave.home.co> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm a Linux refugee who has been running FreeBSD for about a week now and am extremely pleased with the system. In porting some software over, I've encountered a few differences from glibc2 I'd like some info on, that I don't remember seeing under Linux. Well, just one for now. I'm running 3.2-RELEASE, as anoncvs appears to be broken, that is to say it isn't anonymous, an (unknown to me) password is required, and judging from the date of a couple unanswered complaints on the mailing lists and newsgroups, has been broken for about three weeks! Correct me if I'm wrong here, it seems unlikely the service could go down for so long without more people than this noticing, but I far as I can tell, it is. So, I cannot check to see if the following behaviour persists in 3.2-CURRENT: fseek() will not only seek past the end of a file, but will also seek backwards (negative offset) past the beginning of a file. The next file access fails instead of the call to fseek(). Is there some kind of way to make a hole in a file by seeking backwards I am unaware of, or is this a bug? Also, fseek()-ing out of file boundaries, in either direction, succeeds, in the sense that the call returns zero, if the file has been opened read-only, which, in my opinion, it shouln't. What say ye gurus? -- James Bailie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message