From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 19 18:17:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA3C106564A for ; Sat, 19 Apr 2008 18:17:51 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-mealy.atl.sa.earthlink.net (elasmtp-mealy.atl.sa.earthlink.net [209.86.89.69]) by mx1.freebsd.org (Postfix) with ESMTP id 89DC98FC2D for ; Sat, 19 Apr 2008 18:17:51 +0000 (UTC) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=VDO31OgNWwYMXMpM25DqNovxtBAO+C/tJG+w4pA9XUXoCKBonTyVoQo4w6ScpfWb; h=Message-ID:Date:From:Reply-To:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.48] (helo=elwamui-rustique.atl.sa.earthlink.net) by elasmtp-mealy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1JnHON-00077g-LX for freebsd-hackers@freebsd.org; Sat, 19 Apr 2008 14:02:27 -0400 Received: from 71.9.7.20 by webmail.pas.earthlink.net with HTTP; Sat, 19 Apr 2008 14:02:27 -0400 Message-ID: <29853546.1208628147652.JavaMail.root@elwamui-rustique.atl.sa.earthlink.net> Date: Sat, 19 Apr 2008 11:02:27 -0700 (GMT-07:00) From: Randall Hyde To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da940443a92b74ef4b8e9135d2dc2d1c3c7eb350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.48 Subject: chdir/rmdir X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Randall Hyde List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 18:17:51 -0000 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.