Date: Thu, 24 Mar 2005 10:10:07 GMT From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/77493: freebsd 5.3 + bash process substitution Message-ID: <200503241010.j2OAA71b065112@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/77493; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: Travis Morgan <travis@bigfiber.net> 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 <chet@caleb.ins.cwru.edu> > ... > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503241010.j2OAA71b065112>