From owner-freebsd-hackers Sat Mar 9 13:52:23 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA28021 for hackers-outgoing; Sat, 9 Mar 1996 13:52:23 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [192.216.222.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA28012 for ; Sat, 9 Mar 1996 13:52:20 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id NAA13512 for ; Sat, 9 Mar 1996 13:52:14 -0800 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA21396; Sat, 9 Mar 1996 13:59:06 -0700 From: Terry Lambert Message-Id: <199603092059.NAA21396@phaeton.artisoft.com> Subject: Re: Weird problem. To: joerg_wunsch@uriah.heep.sax.de Date: Sat, 9 Mar 1996 13:59:06 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, gavin@linux1.dlsu.edu.ph In-Reply-To: <199603091414.PAA01266@uriah.heep.sax.de> from "J Wunsch" at Mar 9, 96 03:14:50 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: owner-hackers@FreeBSD.ORG Precedence: bulk > > Given the pid of a process, is there any way of finding the executable > > file (including complete path) of this process? > > This is one of the Unix FAQs. No, it's not possible, and nobody could > even guarantee you that the pathname is still available. If you don't > believe it, consider the following: > > ./foo & rm -f foo Well, if it hasn't been deleted, it's possible. But of course, by the time the reverse lookup is complete, it has probably finished running anyway (it's very time consuming, but there is nothing preventing you from writing a program to do it for you). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.