X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: [1.7] bug in chdir Date: Tue, 14 Jul 2009 21:47:34 +0000 (UTC) Lines: 23 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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 $ ls //home ls: reading directory //home: No such file or directory $ # makes sense; I don't have a remote machine named home $ cd //home $ # huh? no error reported? $ /bin/pwd # avoid shortcuts in bash builtin; /bin/pwd uses getcwd //home $ # huh? getcwd is happy with it? $ ls ls: reading directory .: No such file or directory $ # then how'd we get here? We should fix chdir() to fail on attempts to go to an impossible virtual directory. I discovered this because of a bug in dash: $ dash -c 'CDPATH=/; cd home' //home which took me to a non-existent directory, instead of the intended /home. -- Eric Blake -- 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