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:from:to:cc:subject:content-type :content-transfer-encoding:in-reply-to:references:date :message-id:mime-version; q=dns; s=default; b=f9sWER03xUb8+MxaDG N1NBdJNDQRwASrD1bQf1jtlVUixAX5TN5jzewCcU7VmvM0qpCc5q98rku9qKc87p vhdXVg6RvY5jKpuxVFgImHzCM0sUTctEb0mtQJsedREWGhS7rnpYSVySCouMiR7u 7iTKFw/2DcYmsWUVDfrQ7Ew3E= 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=BNoGKuKD0sDe+4aAPKrAxxw3 sxI=; b=xsN8pmsf/UL800mgBBSlYPgpJLYx4bksRzncTxqeGV6J/RT6ny3bOn83 9odbYVoFwfeFTxTSGbClwxb9SGRFVkjm8qrncWAIRunZLsD6ZwZwKmj9MfF7obBg VFkXZciMfLluVF1ImnMlEhLgsefO85sH4E6IKmr8E8T9N4A9Od4= 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,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailout.ish.de X-Spam-Score: -0.01 From: Helmut Karlowski To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Subject: Re: opendir(/dev/fd/n) should fail Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20150123094322.GA5612@calimero.vinschen.de> References: <20150123094322 DOT GA5612 AT calimero DOT vinschen DOT de> Date: Fri, 23 Jan 2015 10:54:30 +0100 Message-Id: <20150123105430.210869D0.helmut.karlowski@ish.de> MIME-Version: 1.0 X-IsSubscribed: yes -------------------------------------------------- Corinna Vinschen wrote: (23/01/2015 10:43) > > numerous entries ... > > This occurs on Linux as well, just with a few less entries in > fd (42 rather than 560). These descriptors are apparently > created by bash for some reason I don't know, and our bash seems > to create some more descriptors than the newler bash on Linux. 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): [ 752:3] globit:ksh_opendir:'/dev/fd/3/0/',prefix_len=12,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/1/',prefix_len=12,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/2/',prefix_len=12,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/',prefix_len=12,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/0/',prefix_len=14,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/1/',prefix_len=14,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/2/',prefix_len=14,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/',prefix_len=14,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/0/',prefix_len=16,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/1/',prefix_len=16,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/2/',prefix_len=16,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/',prefix_len=16,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/0/',prefix_len=18,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/1/',prefix_len=18,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/2/',prefix_len=18,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/',prefix_len=18,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/0/',prefix_len=20,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/1/',prefix_len=20,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/2/',prefix_len=20,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/',prefix_len=20,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/0/',prefix_len=22,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/1/',prefix_len=22,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/2/',prefix_len=22,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/',prefix_len=22,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/0/',prefix_len=24,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/1/',prefix_len=24,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/2/',prefix_len=24,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/',prefix_len=24,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/0/',prefix_len=26,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/1/',prefix_len=26,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/2/',prefix_len=26,hasdot=0,fignore=484444:'' [ 752:3] globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/3/',prefix_len=26,hasdot=0,fignore=484444: ... Linux seems to have has a similar bug. -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