From owner-freebsd-current@FreeBSD.ORG Thu Jan 14 19:41:07 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E841065670; Thu, 14 Jan 2010 19:41:07 +0000 (UTC) (envelope-from chet.ramey@case.edu) Received: from mpv2.tis.cwru.edu (mpv2.tis.cwru.edu [129.22.105.37]) by mx1.freebsd.org (Postfix) with ESMTP id 9369F8FC1C; Thu, 14 Jan 2010 19:41:07 +0000 (UTC) Received: from mpv5.TIS.cwru.edu (mpv5.tis.CWRU.Edu [129.22.105.51]) by mpv2.tis.cwru.edu (MOS 4.1.8-GA) with ESMTP id AEG75370; Thu, 14 Jan 2010 14:25:56 -0500 Received: from caleb.INS.CWRU.Edu (caleb.INS.CWRU.Edu [129.22.8.211]) by mpv5.TIS.cwru.edu (MOS 3.10.8-GA) with ESMTP id EXQ13324 (AUTH cpr); Thu, 14 Jan 2010 14:25:49 -0500 (EST) Message-ID: <4B4F6FBD.5090707@case.edu> Date: Thu, 14 Jan 2010 14:25:49 -0500 From: Chet Ramey User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Antoine Brodin References: <20100114155755.GA77799@mr-happy.com> <20100114184758.3c4e18ca.antoine@FreeBSD.org> In-Reply-To: <20100114184758.3c4e18ca.antoine@FreeBSD.org> X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Status: score=10/51, host=mpv2.tis.cwru.edu X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A020204.4B4F6FC2.0092,ss=1,fgs=0, ip=0.0.0.0, so=2009-09-22 00:05:22, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false X-Mailman-Approved-At: Thu, 14 Jan 2010 20:41:25 +0000 Cc: freebsd-current@freebsd.org, chet.ramey@case.edu, Jeff Blank Subject: Re: Regression in sh(1) ? (Was: make delete-old fails when removing catpages) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: chet.ramey@case.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 19:41:08 -0000 On 1/14/10 12:47 PM, Antoine Brodin wrote: > This seems to be a regression in sh(1). > Simple test case: > This succeeds on stable/8: > %%% >> sh > $ touch /tmp/foo; 3<&0; echo /tmp/foo | while read i; do rm -vi ${i} <&3 ; done > remove /tmp/foo? y > /tmp/foo > %%% > > and fails on head: > %%% >> sh > $ touch /tmp/foo; 3<&0; echo /tmp/foo | while read i; do rm -vi ${i} <&3 ; done > remove /tmp/foo? $ > %%% If these are the actual commands that fail, this is more of a bug fix than a regression. The command "3<&0" is not supposed to be equivalent to "exec 3<&0", and the effects of the redirection should not persist in the calling shell. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/