From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8033 invoked from network); 11 May 2006 16:11:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 May 2006 16:11:54 -0000 Received: (qmail 62304 invoked from network); 11 May 2006 16:11:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 May 2006 16:11:46 -0000 Received: (qmail 5551 invoked by alias); 11 May 2006 16:11:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10248 Received: (qmail 5539 invoked from network); 11 May 2006 16:11:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 May 2006 16:11:37 -0000 Received: (qmail 61233 invoked from network); 11 May 2006 16:11:37 -0000 Received: from s1tank.virtdom.com (216.240.101.50) by a.mx.sunsite.dk with SMTP; 11 May 2006 16:11:36 -0000 Received: (qmail 21741 invoked by uid 89); 11 May 2006 17:00:55 -0000 Received: from ool-44c5ba23.dyn.optonline.net (HELO venti) (brian@aljex.com@68.197.186.35) by s1tank.virtdom.com with SMTP; 11 May 2006 17:00:55 -0000 Message-ID: <00b901c67515$d7715690$6500000a@venti> From: "Brian K. White" To: References: <87r7324zyh.fsf@asfast.com> <009101c673f7$06b3f090$6500000a@venti> <877j4ujizh.fsf@asfast.com><060510204131.ZM11934@torch.brasslantern.com> Subject: Re: File locking within zsh? Date: Thu, 11 May 2006 12:13:03 -0400 Organization: Aljex Software MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 ----- Original Message ----- From: "Tim Writer" To: "Bart Schaefer" Cc: Sent: Thursday, May 11, 2006 10:25 AM Subject: Re: File locking within zsh? > Bart Schaefer writes: > >> On May 10, 6:04pm, Tim Writer wrote: >> } >> } IIRC, zsh avoids forking in subshells but don't most >> } shells implement subshells with fork()? >> >> Zsh forks for subshells, too. It may avoid an *additional* fork when >> the only thing the subshell does is execute an external command, but >> it always forks at least once. > > Okay. But I don't understand this: > > tim@ganesh% echo $ZSH_VERSION > 4.2.5 > tim@ganesh% echo $$; ( echo $$ ) > 18095 > 18095 > tim@ganesh% Without special measures, wouldn't both $$ be expanded at the same time before the line is executed, before the subshell is forked? However, I avoid all possible globbing issues and still get your result: set |(cat;set) |less '$'=6511 PPID=6474 '$'=6511 PPID=6474 Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!