From owner-freebsd-questions Sat May 24 17:52:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA28590 for questions-outgoing; Sat, 24 May 1997 17:52:30 -0700 (PDT) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA28585 for ; Sat, 24 May 1997 17:52:27 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with SMTP id RAA16879; Sat, 24 May 1997 17:53:05 -0700 (PDT) Message-Id: <199705250053.RAA16879@implode.root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Paul Traina cc: questions@FreeBSD.ORG Subject: Re: execve() and the actual name of the image executed In-reply-to: Your message of "Sat, 24 May 1997 16:01:22 PDT." <199705242301.QAA19073@precipice.shockwave.com> From: David Greenman Reply-To: dg@root.com Date: Sat, 24 May 1997 17:53:05 -0700 Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >The parameters passed to execve include the filename that you wish >to exec, followed by the argv and envp structures. A quick perusal >of kern_exec.s shows the kernel copying the argv and envp structures >to the new process area, but it appears as if the path to the >executable is lost. Yup. >Is there any /absolutely guaranteed/ way to get a pointer to the/a path >that was actually used to invoke an image from that image? /proc//file is one way. This only works on FreeBSD 2.2+, however. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project