From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 24 10:10:07 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96CF116A4CE for ; Thu, 24 Mar 2005 10:10:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 714D043D4C for ; Thu, 24 Mar 2005 10:10:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2OAA7pF065114 for ; Thu, 24 Mar 2005 10:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2OAA71b065112; Thu, 24 Mar 2005 10:10:07 GMT (envelope-from gnats) Date: Thu, 24 Mar 2005 10:10:07 GMT Message-Id: <200503241010.j2OAA71b065112@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Subject: Re: misc/77493: freebsd 5.3 + bash process substitution X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2005 10:10:07 -0000 The following reply was made to PR kern/77493; it has been noted by GNATS. From: Bruce Evans To: Travis Morgan Cc: freebsd-gnats-submit@freebsd.org Subject: Re: misc/77493: freebsd 5.3 + bash process substitution Date: Thu, 24 Mar 2005 21:06:23 +1100 (EST) On Wed, 23 Mar 2005, Travis Morgan wrote: > I filed this bug with the bash bugs team as well and received the following response from them. According to Chet this would appear to be a FreeBSD problem, not a bash problem. > Date: Wed, 9 Mar 2005 21:45:17 -0500 > From: Chet Ramey > ... > I think this is a FreeBSD bug. I did some testing today using > 5.4-PRERELEASE. > > The bash `read' builtin, unless it's reading from a pipe, uses > buffered reads. When reading from stdin, upon reading a newline, it > must seek the input file pointer back to the offset of the newline to > avoid potentially stealing input from other programs. > > This seeking backward does not work when applied to named pipes on > FreeBSD 5.[34], though there is no indication that it fails. > > I don't know how FreeBSD implements named pipes, but they're not pipes: > lseek doesn't return failure when applied to them. > ... This (the non-failure of lseek() on named pipes) was fixed in 1996 in rev.1.52 of vfs_syscalls.c and associated changes, but was broken in 2003 in rev.1.319 of vfs_syscalls.c and associated changes. See PR 65786 for details. (This PR is about the affect of lseek()'s bug on dd.) Bruce