From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 18 12:40:23 2006 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.ORG Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AA4016A407; Wed, 18 Oct 2006 12:40:23 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CBE943D46; Wed, 18 Oct 2006 12:40:19 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.8/8.13.8) with ESMTP id k9ICeI5i054601; Wed, 18 Oct 2006 16:40:18 +0400 (MSD) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.8/8.13.8/Submit) id k9ICeIY5054600; Wed, 18 Oct 2006 16:40:18 +0400 (MSD) (envelope-from ache) Date: Wed, 18 Oct 2006 16:40:18 +0400 From: Andrey Chernov To: Ruslan Ermilov Message-ID: <20061018124018.GA54280@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Ruslan Ermilov , freebsd-bugs@FreeBSD.ORG References: <200610111730.k9BHUMH4085536@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200610111730.k9BHUMH4085536@freefall.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/104295: freopen(NULL, ...) does bad things to file offset. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 12:40:23 -0000 On Wed, Oct 11, 2006 at 05:30:22PM +0000, Ruslan Ermilov wrote: > I don't know the stdio code very well, but I tracked it down to > optimizations in _fseeko(); basically, freopen() calls The problem revealed is more complex. See my final fix in v1.17. All those bugs was introduced in v1.11 (tjr) attempting to implement file == NULL POSIX handling, brokenness affects even normal file != NULL case when append (no seek). I write re@ asking for MFC aprovement, but not hear anything yet. -- http://ache.pp.ru/