From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 23:31:04 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92FDC16A4CE for ; Sun, 20 Feb 2005 23:31:04 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DE0343D39 for ; Sun, 20 Feb 2005 23:31:04 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j1KNV0RQ008447; Sun, 20 Feb 2005 18:31:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j1KNV0NA008446; Sun, 20 Feb 2005 18:31:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 20 Feb 2005 18:31:00 -0500 From: David Schultz To: Igor Shmukler , freebsd-hackers@FreeBSD.ORG Message-ID: <20050220233100.GA8430@VARK.MIT.EDU> Mail-Followup-To: Igor Shmukler , freebsd-hackers@FreeBSD.ORG References: <20050220232712.GA8305@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050220232712.GA8305@VARK.MIT.EDU> Subject: Re: vn_fullpath() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 23:31:04 -0000 On Sun, Feb 20, 2005, David Schultz wrote: > On Sun, Feb 20, 2005, Igor Shmukler wrote: > > Hello, > > > > I was wondering if anyone has figured a way to make vn_fullpath() reliable? > > > > Perhaps there is another approach to attacking this problem. Here is what I need > > to accomplish: > > > > I need to be able to determine dynamic linker, shared libraries or executable > > name for a specific process. > > You'd essentially need to write a full version of getcwd(3) in the > kernel. This would be useful for a number of things, performance > and Linux emulation included. You might take a look at how libc's > getcwd() works and take it from there. There's also a linux_getcwd() in the Linuxolator, but it's slightly broken in ways I don't recall.