Date: Sat, 19 Apr 2008 11:02:27 -0700 (GMT-07:00) From: Randall Hyde <randyhyde@earthlink.net> To: freebsd-hackers@freebsd.org Subject: chdir/rmdir Message-ID: <29853546.1208628147652.JavaMail.root@elwamui-rustique.atl.sa.earthlink.net>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29853546.1208628147652.JavaMail.root>