From owner-freebsd-hackers Tue Jul 13 11:33:50 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dt054n86.san.rr.com (dt054n86.san.rr.com [24.30.152.134]) by hub.freebsd.org (Postfix) with ESMTP id 5B1CB14E6B for ; Tue, 13 Jul 1999 11:33:48 -0700 (PDT) (envelope-from Doug@gorean.org) Received: from localhost (doug@localhost) by dt054n86.san.rr.com (8.8.8/8.8.8) with ESMTP id LAA16007 for ; Tue, 13 Jul 1999 11:33:47 -0700 (PDT) (envelope-from Doug@gorean.org) Date: Tue, 13 Jul 1999 11:33:47 -0700 (PDT) From: Doug X-Sender: doug@dt054n86.san.rr.com To: freebsd-hackers@FreeBSD.ORG Subject: Re: bin/12578: `` subshell taints PWD In-Reply-To: <199907131815.UAA12928@dorifer.heim3.tu-clausthal.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 13 Jul 1999, Oliver Fromme wrote: > > But isn't that exactly what's happening here, where PWD is being tainted > > by the commands evaluated within the substitution? > > Yes, I'd call that a bug which should be fixed. > The manpage clearly says: > > "The shell expands the command substitution by executing > command in a subshell environment and replacing the command > substitution with the standard output of the command [...]" > > Alternatively, the manpage could be "fixed". ;-) The correct way to fix the problem is to bring our sh in line with posix in this respect. Someone more familiar with the spec than I could tell you for sure, however I can say with relative security that subshell processes should not taint parent shell variables. Exercising my firm grasp of the obvious, Doug -- On account of being a democracy and run by the people, we are the only nation in the world that has to keep a government four years, no matter what it does. -- Will Rogers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message