Date: Tue, 13 Jul 1999 11:33:47 -0700 (PDT) From: Doug <Doug@gorean.org> To: freebsd-hackers@FreeBSD.ORG Subject: Re: bin/12578: `` subshell taints PWD Message-ID: <Pine.BSF.4.05.9907131131530.16002-100000@dt054n86.san.rr.com> In-Reply-To: <199907131815.UAA12928@dorifer.heim3.tu-clausthal.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9907131131530.16002-100000>
