chdir/rmdir
Randall Hyde
randyhyde at earthlink.net
Sat Apr 19 18:17:51 UTC 2008
Hi,
I recently made a couple of calls like the following
// currently in /x/y/z
chdir( "/x/y" );
rmdir( "/x/y/z" );
When I did at "gwd" call, it returned "/x/y/z" along with ENOTDIR.
Is this a known issue?
I'm making low-level (assembly) calls via int 0x80 to do the above (not C stdlib), though I can't imagine that's causing the problem (then again, I've written broken code before :-(, this wouldn't be the first time I've messed up, though I have studied the code very closely and the same function calls work fine in other contexts).
Thanks for any input,
Randy Hyde
P.S. I noticed that the man pages said something about using open on "." and fchdir to more robustly switch back to some previous directory; this is what has me wondering if there is a problem with executing statements like the above.
More information about the freebsd-hackers
mailing list