X-Recipient: archive-cygwin AT delorie DOT 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=XdI5ru ikHQVPPPWEzD6v4RfRMjvbCTPLt1S1HuWS3lNV068hocvjBVSY8HGS15vvSz/qYF WrfFNM4PiE9Ow6v1aq+iHJum6CrDBWNIzjJ40adA9fYVgMTmToKZeIkXagKao7zI AHLGJkeF84Yoywx+G0lUnMOI0bRSMuC66Bqww= 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=EuyUwpOsk0/V ozrNxk7kJfdZ0io=; b=uFcdWkudW8wScR2uGIC+aLcM6X0j3Hj0zyJjviDPSLNd Sg36nEFXkiCkeUbZckYMvoZJT8/bXTmzT7sGy5YwhrZK5C17LgJIn6SuCQ2wSotL 6rLPTqxMOrgTCgy6ToRmttIXd57DNjdcwYABzoj5oze4hMH1ag2A36rlBch/F1w= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <54C254E6.7030408@redhat.com> Date: Fri, 23 Jan 2015 07:04:22 -0700 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: opendir(/dev/fd/n) should fail References: <20150123094322 DOT GA5612 AT calimero DOT vinschen DOT de> <20150123105430 DOT 210869D0 DOT helmut DOT karlowski AT ish DOT de> <20150123110034 DOT B8F3A9F0 DOT helmut DOT karlowski AT ish DOT de> In-Reply-To: <20150123110034.B8F3A9F0.helmut.karlowski@ish.de> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P6NMpAoEdIXiSdRomDuV2NvEjfAoTXUR0" X-IsSubscribed: yes --P6NMpAoEdIXiSdRomDuV2NvEjfAoTXUR0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/23/2015 03:00 AM, Helmut Karlowski wrote: >=20 > -------------------------------------------------- > Helmut Karlowski wrote: > (23/01/2015 10:54) >> >> It's not just bash. The same happens in my home-grown shell. Starting=20 >> with /dev/fd/3 opendir succeeds giving (only the opendir-entries): >=20 > Maybe it's because: >=20 > 3 -> /proc/3008/fd/ >=20 > 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 not a cygwin-specific issue, I'm not going to try and do anything about it downstream in the cygwin build of bash. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --P6NMpAoEdIXiSdRomDuV2NvEjfAoTXUR0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUwlTmAAoJEKeha0olJ0NqRxEH/jjyk/9gp/zR0RYfaeGZLEtw hkSK5BtPgLZXL9H46IQNy+Fk9mysMedzo81y9Bwenz1if9ReoYKfc0eYloZrX/lr P3hEx9hON9XLHsR0mltvTcm6uOCSoo0g+tFGDJK2gjWqeHlgWWWsLodjwpzynFlg vIYgYCA/TAtcYH09jW28ncTtHHQ3xLIwzG31duBGWh2KuNqpQDbXURnr1LjWbDEQ 4b82QhL0Sd5QR3JMmsUOLM++21DA4ON6oqTPvrvJ7Iz+yrE8w4KEfdZxvjJTbsWe fRH+gcmANBpBIVVF0frnEBDhrnk5UpWhdOLp9/UZgj/l4711280yBvUdxHr7LRs= =afuC -----END PGP SIGNATURE----- --P6NMpAoEdIXiSdRomDuV2NvEjfAoTXUR0--