Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Sun, 14 Oct 2001 11:50:37 -0400 From: Christopher Faylor To: cygwin-Developers AT cygwin DOT Com Subject: Re: fchdir(fd) defect Message-ID: <20011014115037.D9132@redhat.com> Reply-To: cygwin-developers AT cygwin DOT Com Mail-Followup-To: cygwin-Developers AT cygwin DOT Com References: <3BC9925D DOT A23EB8EC AT yahoo DOT com> <20011014113913 DOT A9132 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011014113913.A9132@redhat.com> User-Agent: Mutt/1.3.21i On Sun, Oct 14, 2001 at 11:39:13AM -0400, Christopher Faylor wrote: >On Sun, Oct 14, 2001 at 09:25:49AM -0400, Earnie Boyd wrote: >>I've discovered that if >> >>chdir("/some/dir/foo") >>fd=open(".", O_RDONLY) >>chdir("/some/dir/bar") >>fchdir(fd) will change to "some/dir/bar" not to "some/dir/foo". >> >>The reason for this is simply that the open stores the "." in the fd >>table and not the absolute directory name it points to. I don't have a >>patch for this yet, I wanted to alert to the problem before 1.3.4 >>released. Feel free to beat me to the punch with the patch. > >It's a simple fix to build_fhandler_new. Add PC_FULL to the arguments >to path_conv.check. I've checked in a fix for this and a corresponding removal of code from fchdir. Thanks, cgf