From owner-freebsd-hackers Sun Jan 18 14:24:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA19730 for hackers-outgoing; Sun, 18 Jan 1998 14:24:30 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rah.star-gate.com (rah.star-gate.com [209.133.7.178]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA19718 for ; Sun, 18 Jan 1998 14:24:16 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id OAA19901; Sun, 18 Jan 1998 14:23:59 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Message-Id: <199801182223.OAA19901@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Terry Lambert cc: jdp@polstra.com, hackers@FreeBSD.ORG Subject: Re: dladdr hax In-reply-to: Your message of "Sun, 18 Jan 1998 22:14:28 GMT." <199801182214.PAA04062@usr04.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 18 Jan 1998 14:23:59 -0800 From: Amancio Hasty Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk {hasty} pwd /usr/home/hasty {hasty} ./test argv[0] ./test getcwd /usr/home/hasty {hasty} /tmp/test argv[0] /tmp/test getcwd /usr/home/hasty Now it looks to me that we have enough information to reconstruct the the execution path. If "test" is a symlink we should be able to follow the symlink provided that thats what we want. Enjoy, Amancio > > > > Thats an interesting approach so what happens to a vnode of a > > > > running executable when is mark for delete? I kind doubt that the > > > > vnode goes away while the image is still executing 8) > > > > > > Of course not. But there is no longer a pathname for it. > > Actually, there is; it's in /proc. 8-). I kind of doubt that > Classes.zip is located relative to /proc, however. 8-(. > > > > So whats wrong with just simply calling getwcd in the main of the > > program? > > > > That should get us the current working directory which is what is > > needed by java to locate its class libraries. > > Because it will return the directory name of where you ran it from, not > the directory name of where the image that is executng is located? > > 8-) 8-). > > The classes are located relative to the image, not relative to where > the image was run from... > > > The real PITA here is that most of the kludge workarounds being discussed > will not allow the creation of a correct JRE for a java applet that is > being run by an execution class loader from the kernel. So they aren't > even good workarounds, since they preclude future work. And that's a > bad thing. > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers.