From owner-freebsd-arch@FreeBSD.ORG Tue Sep 14 03:31:10 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8084216A4CE for ; Tue, 14 Sep 2004 03:31:10 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62A2B43D5F for ; Tue, 14 Sep 2004 03:31:10 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 1960A72DF6; Mon, 13 Sep 2004 20:31:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 16F8272DF4; Mon, 13 Sep 2004 20:31:10 -0700 (PDT) Date: Mon, 13 Sep 2004 20:31:10 -0700 (PDT) From: Doug White To: Jun Kuriyama In-Reply-To: <7macvto7wn.wl@black.imgsrc.co.jp> Message-ID: <20040913203044.X34536@carver.gumbysoft.com> References: <7macvto7wn.wl@black.imgsrc.co.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@FreeBSD.org Subject: Re: stderr is seekable? (lseek(2)) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 03:31:10 -0000 On Tue, 14 Sep 2004, Jun Kuriyama wrote: > > When I tested this program, it finished successfully. But on Linux, > lseek(2) returns -1 and errno is ESPIPE. > > I expected to be returned ESPIPE as Linux did. Is our behavior > correct, or there is something wrong? You might poke -standards about this, someone there probably has a copy of POSIX and can see waht the required behavior is. I'm inclined to call this a "bonus feature" on our part :) > > ----- > #include > #include > #include > #include > > int > main(int argc, char **argv) > { > off_t r = lseek(2, 1, SEEK_CUR); > printf("r=%d\n", r); > if (r == -1) { > printf("errno=%d, %s\n", errno, strerror(errno)); > } > return 0; > } > ----- > > > -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org