This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: fchdir(fd) defect
- To: cygwin-Developers at cygwin dot Com
- Subject: Re: fchdir(fd) defect
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Sun, 14 Oct 2001 11:39:13 -0400
- References: <3BC9925D.A23EB8EC@yahoo.com>
- Reply-To: cygwin-developers at cygwin dot Com
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.
cgf