From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 21 02:47:49 2004 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 E0FBB16A4CE for ; Wed, 21 Jul 2004 02:47:49 +0000 (GMT) Received: from creme-brulee.marcuscom.com (rrcs-midsouth-24-172-16-118.biz.rr.com [24.172.16.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91DE543D64 for ; Wed, 21 Jul 2004 02:47:49 +0000 (GMT) (envelope-from marcus@marcuscom.com) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) i6L2lYli024768 for ; Tue, 20 Jul 2004 22:47:34 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: hackers@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-fHBrVFSMzkSdd9YbK1eN" Organization: MarcusCom, Inc. Message-Id: <1090378066.90026.105.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 20 Jul 2004 22:47:47 -0400 X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on creme-brulee.marcuscom.com X-Mailman-Approved-At: Wed, 21 Jul 2004 11:44:43 +0000 Subject: Getting a fully-qualified path from a PID 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: Wed, 21 Jul 2004 02:47:50 -0000 --=-fHBrVFSMzkSdd9YbK1eN Content-Type: text/plain Content-Transfer-Encoding: quoted-printable What is the canonical way for a userland application to get the fully-qualified path of an executable from its running PID? I know I can do a readlink(2) on /proc/pid/file, but procfs is deprecated on 5.X, correct? Is there a more appropriate way to do this? Thanks. Joe --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-fHBrVFSMzkSdd9YbK1eN Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBA/dlSb2iPiv4Uz4cRAoHlAJ4/E3z6LJnf0fWUR5HzA65nZ06OGACfS5H7 uZKxyebTgXDrF14bp/ObULw= =lxbT -----END PGP SIGNATURE----- --=-fHBrVFSMzkSdd9YbK1eN--