From owner-freebsd-hackers Tue Jul 13 2:16: 2 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay03.indigo.ie (relay03.indigo.ie [194.125.133.227]) by hub.freebsd.org (Postfix) with SMTP id 8E9761501E for ; Tue, 13 Jul 1999 02:15:50 -0700 (PDT) (envelope-from niall@pobox.com) Received: (qmail 22387 messnum 46251 invoked from network[194.125.134.40/ts01-040.dublin.indigo.ie]); 13 Jul 1999 09:15:19 -0000 Received: from ts01-040.dublin.indigo.ie (HELO pobox.com) (194.125.134.40) by relay03.indigo.ie (qp 22387) with SMTP; 13 Jul 1999 09:15:19 -0000 Message-ID: <378B1EBD.EB06F5B9@pobox.com> Date: Tue, 13 Jul 1999 11:10:53 +0000 From: Niall Smart X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Sheldon Hearn Cc: hackers@freebsd.org Subject: Re: bin/12578: `` subshell taints PWD References: <74394.931798425@axl.noc.iafrica.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sheldon Hearn wrote: > > On Mon, 12 Jul 1999 18:37:13 GMT, Niall Smart wrote: > > > The patch appended seems to fix this, I'd like someone familiar > > with sh to review it though, since this may be symptomatic of > > a general problem with command substitution. > > As I understand your patch, you're saying "we should fork off a child > process when the command in question is cd"? This is what I missed when > I tried ``echo .`sleep 600`.'' and assumed that the result was proof > that we always spawn a subprocess for backtick evaluation. :-( As I understand it most builtins will not spawn a new shell when they are used in command substitution: niall% echo `echo $$` $$ 20354 20354 niall% Niall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message