From owner-freebsd-hackers Wed May 23 4:38:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 8026937B422 for ; Wed, 23 May 2001 04:38:23 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 23 May 2001 12:38:22 +0100 (BST) Date: Wed, 23 May 2001 12:38:21 +0100 From: David Malone To: "Koster, K.J." Cc: 'Alfred Perlstein' , 'FreeBSD Hackers mailing list' Subject: Re: Linux getcwd problems Message-ID: <20010523123821.A52523@walton.maths.tcd.ie> References: <59063B5B4D98D311BC0D0001FA7E452205FD9C04@l04.research.kpn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <59063B5B4D98D311BC0D0001FA7E452205FD9C04@l04.research.kpn.com>; from K.J.Koster@kpn.com on Wed, May 23, 2001 at 01:02:01PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, May 23, 2001 at 01:02:01PM +0100, Koster, K.J. wrote: The problem seems to be that FreeBSD's getcwd library call will impliment the getcwd userland if the syscall fails or is unimplimented. There are times when the syscall fails in normal operation and you don't see this with the BSD stuff 'cos it is covered up by the userland implimentation. You can check this by kdumping a FreeBSD version of your cwd program and searching for the return value of the __getcwd syscall. The Linux emulation stuff just calls the FreeBSD syscall, but I guess the Linux libraries don't expect getcwd to fail, so they can't do the userland magic. I haven't had a chance to look at how hard it would be to fix the FreeBSD getcwd call to always work, or to fake the Linux stuff so that it somehow did the equivelent of the userland thing. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message