This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
fchdir(fd) defect
- To: CD List <Cygwin-Developers at Cygwin dot Com>
- Subject: fchdir(fd) defect
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Sun, 14 Oct 2001 09:25:49 -0400
- Reply-To: CD List <Cygwin-Developers at Cygwin dot Com>
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.
Earnie.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com