From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 373 invoked from network); 5 May 2003 18:27:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 May 2003 18:27:17 -0000 Received: (qmail 17310 invoked by alias); 5 May 2003 18:27:04 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6077 Received: (qmail 17303 invoked from network); 5 May 2003 18:27:04 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 5 May 2003 18:27:04 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.182.10.250] by sunsite.dk (MessageWall 1.0.8) with SMTP; 5 May 2003 18:27:3 -0000 Received: from localhost (localhost [127.0.0.1]) (uid 0) by asfast.net with local; Mon, 05 May 2003 14:27:02 -0400 To: zsh-users@sunsite.dk Subject: Re: Getting the name of zsh-generated temp file? References: <20030505133637.GA26425@fysh.org> <1030505165710.ZM24097@candle.brasslantern.com> From: Lloyd Zusman >Return-Path: ljz@asfast.com Reply-To: ljz@asfast.com Date: Mon, 05 May 2003 14:27:02 -0400 In-Reply-To: <1030505165710.ZM24097@candle.brasslantern.com> (Bart Schaefer's message of "Mon, 5 May 2003 16:57:10 +0000") Message-ID: <65opp7ux.fsf@asfast.com> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (berkeley-unix) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: Lloyd Zusman "Bart Schaefer" writes: > It should be pointed out that assigning the =(...) expression to a variable > is meant to be the only way to get the temporary file to persist. In all > other cases (and, in older versions of zsh, even for assignments) the file > is automatically removed as soon as the surrounding expression completes. > > Lloyd originally wrote: >> One of these is left sitting around in /tmp after each termination > > In short, This Should Not Happen unless zsh is crashing or you are doing > something unusual to cause the file to be left behind. I am using 'exec' to invoke a different executable from within my zsh script. I think that this is preventing the temp file from being removed. I have control of the other executable, and so I now can pass the name of the temp file as an argument to this executable, who now explicitly removes it. And I should add I deliberately want to replace my script with the other executable, which is why I'm using 'exec'. -- Lloyd Zusman ljz@asfast.com