Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from rcpt-expgw.biglobe.ne.jp by f.primenet.com.au (envelope-from <takimoto-j@kba.biglobe.ne.jp>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(133.208.98.3):SA:0(-1.3/5.0):. 
 Processed in 0.100663 secs); 11 Jul 2016 20:08:11 -0000
X-Spam-Status: No, score=-1.3 required=5.0
X-Spam-Level: 
X-Biglobe-Sender: <takimoto-j@kba.biglobe.ne.jp>
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Subject: Re: [BUG] Directory glob picks up running or already-run scripts on OS X
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
In-Reply-To: <A07548DE-DE2E-4918-AE88-3BCCCD21828B@kba.biglobe.ne.jp>
Date: Tue, 12 Jul 2016 05:08:07 +0900
Content-Transfer-Encoding: 7bit
Message-Id: <1608492B-D4BE-417A-B278-FECCE0887E11@kba.biglobe.ne.jp>
References: <CEE58D57-A237-4451-8882-0AE0CE21DD58@gmail.com>  <CAH+w=7Y6GEJxa5LS4AeG5V5hsyUYJkSEEEMRnMSSJpLpRfLPXA@mail.gmail.com>  <9516F748-A5C9-41D7-9739-A87B771551FD@kba.biglobe.ne.jp> <160711095934.ZM13739@torch.brasslantern.com> <A07548DE-DE2E-4918-AE88-3BCCCD21828B@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
X-Mailer: Apple Mail (2.1878.6)
X-Biglobe-Spnum: 49196
X-Seq: zsh-workers 38831

Sorry, it is not necessary to run the script and atest (access(2)) from
within the same shell. Running the script by /usr/local/bin/zsh
is enough to 'cache' the info.

On El Captain:
bash$ ./atest foo/.
-1
bash$ /usr/local/bin/zsh -c ./foo
zsh:1: ./foo: bad interpreter: /bogus/command: no such file or directory
bash$ ./atest foo/.
0
bash$

