X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:cc:subject:content-type
	:content-transfer-encoding:in-reply-to:references:date
	:message-id:mime-version; q=dns; s=default; b=Z+mct2E0VFWvnYbRkw
	fMOZHCeZpKbDVyzAXJJqmn6hN0iMqYDoehaO9O433DZ67UHhwnF7r0r4V1ABSRpt
	yZzYHZJ5h217nTGHFL/ZldKR2xmJNuCa3bGmx/vY4dUOdFy3aCFtNPS0zK+gQvKR
	8OKU+PLI6PJsRT+TI5ct7QDqQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:cc:subject:content-type
	:content-transfer-encoding:in-reply-to:references:date
	:message-id:mime-version; s=default; bh=1VndAX983QQ+nmsTt61rBouu
	OQc=; b=M7jgKhoi0xoOGdaaDRKu4STkqyks9FnW+PlFGy9FtiSldQ3IKoq/Bvr4
	n4y6xLLuphIw7DLxc6lZaVhdeKzoc8g/JPcz8bivjZwVRi02AODJlUf9uILVoAUv
	2oDq4UPiB4jYXy7wjeO9hNU4VQTsH6dXUZ3ufkm7o+lgXsKEOlQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: mailout.ish.de
X-Spam-Score: -0.01
From: Helmut Karlowski <helmut.karlowski@ish.de>
To: Eric Blake <eblake@redhat.com>
Cc: cygwin@cygwin.com
Subject: Re: opendir(/dev/fd/n) should fail
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <54C254E6.7030408@redhat.com>
References: <20150123110034.B8F3A9F0.helmut.karlowski@ish.de> <54C254E6.7030408@redhat.com>
Date: Fri, 23 Jan 2015 15:27:04 +0100
Message-Id: <20150123152704.6D8512E8.helmut.karlowski@ish.de>
MIME-Version: 1.0
X-IsSubscribed: yes


--------------------------------------------------
Eric Blake <eblake@redhat.com> wrote:
(23/01/2015 15:04)

> On 01/23/2015 03:00 AM, Helmut Karlowski wrote:
> > 
> > --------------------------------------------------
> > Helmut Karlowski <helmut.karlowski@ish.de> wrote:
> > (23/01/2015 10:54)
> >>
> >> It's not just bash. The same happens in my home-grown shell. Starting 
> >> with /dev/fd/3 opendir succeeds giving (only the opendir-entries):
> > 
> > Maybe it's because:
> > 
> > 3 -> /proc/3008/fd/
> > 
> > which recurses into /dev/fd again?
> 
> Yep. You'd get similar behavior for:
> 
> ln -s . dot
> 
> then trying to do a recursive listing of ./dot/**
> 
> Without some form of symlink recursion detection (aka "have we seen the
> inode of this directory higher up in the tree?"), this will affect any
> symlink-to-directory hierarchy loop.  Might be worth reporting it
> upstream to see if bash is willing to add an inode hash table to prevent
> infinite recursion on ** expansions across symlink loops, but as it is

I think ksh93 just does not follow synlinks when doing globstar. At 
least not the cygwin-version. Guess that's what I'll do as well.

-Helmut

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

