From owner-cvs-all Thu Sep 6 18:59:30 2001 Delivered-To: cvs-all@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id A462D37B401; Thu, 6 Sep 2001 18:59:24 -0700 (PDT) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id f871xEd93341; Fri, 7 Sep 2001 05:59:14 +0400 (MSD) (envelope-from ache) Date: Fri, 7 Sep 2001 05:59:13 +0400 From: "Andrey A. Chernov" To: Brian Somers Cc: Poul-Henning Kamp , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio fdopen.c fflush.c fopen.c fseek.c ftell.c fvwrite.c local.h refill.c stdio.c Message-ID: <20010907055913.A93242@nagual.pp.ru> References: <20010907052213.A92817@nagual.pp.ru> <200109070128.f871S0D49573@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200109070128.f871S0D49573@hak.lan.Awfulhak.org> User-Agent: Mutt/1.3.21i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Sep 07, 2001 at 02:28:00 +0100, Brian Somers wrote: > > On Fri, Sep 07, 2001 at 04:56:46 +0400, Andrey A. Chernov wrote: > > > > To reproduce the problem: > > > > First results: I am able to reproduce it on very -current. It not hangs, Middle results. It is not what my commit message says, but this line from stdio.c instead: if ((fp->_flags & __SAPP) && _sseek(fp, (fpos_t)0, SEEK_END) == -1) return (-1); Here error checking added in my variant. If you change this to if (fp->_flags & __SAPP) (void)_sseek(fp, (fpos_t)0, SEEK_END); (without error checking, as was originally), the bug is gone. The bug is that it try to seek to the end of Inet connection, unsuccessfully, and check error code. I'll think how to fix it properly, probably __SAPP flag or error checking needs to be added only in __SOPT case (for regular files only). -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message