Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2001 05:59:13 +0400
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Brian Somers <brian@freebsd-services.com>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, 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>
In-Reply-To: <200109070128.f871S0D49573@hak.lan.Awfulhak.org>
References:  <ache@nagual.pp.ru> <20010907052213.A92817@nagual.pp.ru> <200109070128.f871S0D49573@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010907055913.A93242>