Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 1997 09:29:40 -0700
From:      Paul Traina <pst@shockwave.com>
To:        dg@root.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: execve() and the actual name of the image executed 
Message-ID:  <199705261629.JAA29924@precipice.shockwave.com>
In-Reply-To: Your message of "Sat, 24 May 1997 17:53:05 PDT." <199705250053.RAA16879@implode.root.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks David, that hit the spot.

  From: David Greenman <dg@root.com>
  Subject: Re: execve() and the actual name of the image executed 
  >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/<pid>/file is one way. This only works on FreeBSD 2.2+, however.
  
  -DG
  
  David Greenman
  Core-team/Principal Architect, The FreeBSD Project
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705261629.JAA29924>