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-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
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: <160711095934.ZM13739@torch.brasslantern.com>
Date: Tue, 12 Jul 2016 04:18:30 +0900
Content-Transfer-Encoding: 7bit
Message-Id: <A07548DE-DE2E-4918-AE88-3BCCCD21828B@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>
To: zsh-workers@zsh.org
X-Mailer: Apple Mail (2.1878.6)
X-Biglobe-Spnum: 49224
X-Seq: zsh-workers 38829

I tested on Mavericks (10.9.5) and El Capitan (10.11.5).

On OS X 10.9.5, the behavior is the same as 10.8.

But on 10.11.5, I can not reproduce the strange behavior of
access(2) if I use bash or /bin/zsh (5.0.8, built by Apple).
The problem exists only if I run the script and atest from
/usr/local/bin/zsh (git HEAD, local build).

The script itself (foo in my case) need not be a zsh script.
It can be
#!/bogus/command
to reproduce the problem.

I have no idea where the information that the script foo
has been run is "cached", why it can affect the result
of a system call.

