From owner-freebsd-bugs Wed Apr 1 05:41:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA28087 for freebsd-bugs-outgoing; Wed, 1 Apr 1998 05:41:42 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from localhost.zilker.net (jump-x2-1009.jumpnet.com [207.8.67.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA28079 for ; Wed, 1 Apr 1998 05:41:38 -0800 (PST) (envelope-from marquard@zilker.net) Received: (from marquard@localhost) by localhost.zilker.net (8.8.8/8.8.3) id HAA04810; Wed, 1 Apr 1998 07:40:58 -0600 (CST) To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/6184: No error if resulting file pos in lseek is negative References: <199803311540.RAA18108@scotch.du.etx.ericsson.se> From: Dave Marquardt Date: 01 Apr 1998 07:40:56 -0600 In-Reply-To: Kent Boortz's message of "Tue, 31 Mar 1998 17:40:17 +0200 (CEST)" Message-ID: <85wwd9d5hz.fsf@localhost.zilker.net> Lines: 42 X-Mailer: Quassia Gnus v0.22/XEmacs 19.16 - "Lille" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Kent Boortz writes: > >Number: 6184 > >Category: kern > >Synopsis: No error if resulting file pos in lseek is negative > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-bugs > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Tue Mar 31 07:50:02 PST 1998 > >Last-Modified: > >Originator: > >Organization: > Ericsson Software Technology > >Release: FreeBSD 2.2.5-STABLE i386 > >Environment: > > >Description: > > In FreeBSD 2.2.5 lseek moves the file position without any error > checks. If the resulting position is negative we have the problem that > the result value -1 can mean two things, that there was an error or > that the file position was set to -1 and no error. We have to clear > errno before the call and examine errno after the call to find out if > there was an error or not. > > If the resulting position is negative, Linux and Solaris will > preserve the file position before the call to lseek and return an > error. > > Is this a bug in FreeBSD or a different interpretations of the POSIX > standard? I think this isn't an error until you actually try to read or write at that negative. offset. Then you have an error. -Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message