Date: Thu, 15 Jul 1999 01:30:23 -0400 From: James Bailie <jazzturk@home.com> To: freebsd-questions@freebsd.org Subject: fseek() over bounds of file Message-ID: <19990715013023.A3264@cr31617-a.lndn1.on.wave.home.co>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990715013023.A3264>
