zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] Directory glob picks up running or already-run scripts on OS X
@ 2016-07-09  3:55 Zhiming Wang
  2016-07-10 20:12 ` Bart Schaefer
  0 siblings, 1 reply; 11+ messages in thread
From: Zhiming Wang @ 2016-07-09  3:55 UTC (permalink / raw)
  To: zsh-workers

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. Note that this seems to only apply to scripts, not random executables
(e.g., an executable created by a C compiler). Here's a session that reproduces
the issue:

    $ cd $(mktemp -d)
    $ print '#!/usr/bin/env zsh' >script1
    $ print $'#!/usr/bin/env zsh\nprint -l */' >script2
    $ chmod +x script1 script2
    $ print -l */
    zsh: no matches found: */
    $ ./script1
    $ print -l */
    script1/
    $ ./script2
    script1/
    script2/
    $ print -l */
    script1/
    script2/
    $ print $'#include <stdio.h>\nint main() { printf("hello, world"); }' >hello.c
    $ cc -o hello hello.c
    $ ./hello
    hello, world%
    $ print -l */
    script1/
    script2/

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-07-14  5:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-09  3:55 [BUG] Directory glob picks up running or already-run scripts on OS X Zhiming Wang
2016-07-10 20:12 ` Bart Schaefer
     [not found]   ` <B17666ED-6D14-477C-B45D-3B7F064B5F24@gmail.com>
2016-07-11  0:38     ` Bart Schaefer
2016-07-11  0:48       ` Zhiming Wang
2016-07-11  4:58         ` Bart Schaefer
2016-07-11 10:08           ` Peter Stephenson
2016-07-11  8:51   ` Jun T.
2016-07-11 16:59     ` Bart Schaefer
2016-07-11 19:18       ` Jun T.
2016-07-11 20:08         ` Jun T.
2016-07-14  5:27         ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).