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,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc;
        bh=MbI4kEzlrTSaMr1plX0kqLrlvEk8VVeFYxQxq8aSjvY=;
        b=aeLhvSztwiyJcByMXKuj2Y5Y524J4T6mzE7cAv/Jr8G9qdjGxvbl5hKr3IIRJcdNmF
         NCm7lmxZ7vm9wTSB7D3fQ+3lyxucCF52dUqTMUCyKWLPrn1SXcNjhOcJXpNkxppA8Jgx
         K8HruagrrtK9NXBkk9KQhn4YKQcFmqQTzXdOlTTr9hIOiF2YRPL0CV+LPXqHInIe5NOm
         Fz8G5f6HhG0GJpo6L9otxNCyeEJx2suQc5BOIjledX+UTO/rjcwbYADeMTU1Ki3gu5eu
         fp3ewA0Y5ToYooeJEt7bAggCt0XZqbOgqcnabPgHWKTUuL1X0TTCU8eonSF4Etl4SEq/
         ZEEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc;
        bh=MbI4kEzlrTSaMr1plX0kqLrlvEk8VVeFYxQxq8aSjvY=;
        b=h7trBwYKtgQ4b7izu+kBwekSIa/lvYype1Uon3Qes/EDhD0MbjBXZmX54y7D4ox/Q3
         /llPDfs9a9tmPByEVi7+WVEQR3ljMS1nFkQpJUdx1NsdbmKHP8+PZoGOHd8lcwJhFrvk
         SR03zmMtAKf8JXNMspgVCpfNrH/A8o4xk3omNftJuGtVTOnEr9g66k2Gdk97mGLltpNr
         WqlfRSMyOTwQVNSy1D2uIE7+op5Ya/R5QJrPYUimd6EmrRynSJtJrcyMCHwZE7FKybYd
         R9pkT3DB6JoAYXu7Tc+U5hFIrzqpa+fqZnxzeTelNjtEKwO73FPiEWNa7621Fv/PGamv
         KK5A==
X-Gm-Message-State: ALyK8tJiT7NbgcKGqKJIGlOvrGCo/zGeng8XE3DBGquzmp/1ftxI6zKGlPm+A90ZG2mGLsAIZ5EP7Xf2hhVjAA==
X-Received: by 10.25.159.8 with SMTP id i8mr4340210lfe.74.1468181535806; Sun,
 10 Jul 2016 13:12:15 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <CEE58D57-A237-4451-8882-0AE0CE21DD58@gmail.com>
References: <CEE58D57-A237-4451-8882-0AE0CE21DD58@gmail.com>
From: Bart Schaefer <schaefer@brasslantern.com>
Date: Sun, 10 Jul 2016 13:12:15 -0700
Message-ID: <CAH+w=7Y6GEJxa5LS4AeG5V5hsyUYJkSEEEMRnMSSJpLpRfLPXA@mail.gmail.com>
Subject: Re: [BUG] Directory glob picks up running or already-run scripts on
 OS X
To: Zhiming Wang <zmwangx@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 38817

On Fri, Jul 8, 2016 at 8:55 PM, Zhiming Wang <zmwangx@gmail.com> wrote:
> With zsh 5.2 or master running on OS X 10.11.5 or macOS 10.12 PB1, a glob for
> directories could pick up scripts that are either running or have been
> run.

I'm not able to reproduce this.  I happen to have an iMac that was
upgraded to El Capitan (10.11.5) only yesterday.  This morning I did
the following:

1. Install xcode and agree to the license.
2. Download automake and autoconf from ftp.gnu.org, build, install.
3. Pull the latest zsh from sourceforge git.
4. Recompile zsh with static module linkage so I can run from the build tree
5. Run: Src/zsh -f
6. Attempt to reproduce using your steps, modified a little because
"env zsh" won't find the binary I want.

macadamia% cd $(mktemp -d)
macadamia% print $'#!/usr/bin/env zsh' >script1
macadamia% print $'#!/usr/bin/env zsh\nprint -l */' >script2
macadamia% chmod +x script1 script2
macadamia% print -l */
zsh: no matches found: */
macadamia% ~-/Src/zsh -f script1
macadamia% print -l */
zsh: no matches found: */
macadamia% ~-/Src/zsh -f script2
script2:2: no matches found: */
macadamia% uname -a
Darwin macadamia.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19
18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
macadamia% print $ZSH_PATCHLEVEL
zsh-5.2-310-g304aa25


> I cannot reproduce this issue with zsh 5.0.8 on OS X, so something went wrong
> in between. Unfortunately, due to some limitations I cannot test other versions
> right now. I also cannot repoduce this issue on Linux with any zsh version
> (including 5.2 or master), so this seems to be an OS X specific issue.

This may even be a compiler-specific issue.  Note that I'm
deliberately using the stock compiler with neither homebrew nor
macports and minimal GNU tool install.

What did you use to build zsh?

