From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOwVO-0006uj-O3 for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:57:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOwVJ-0006sO-OK for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:57:38 -0500 Received: from [199.232.76.173] (port=51998 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOwVJ-0006sG-Ia for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:57:33 -0500 Received: from mx20.gnu.org ([199.232.41.8]:50109) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOwVI-0001Eh-5V for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:57:32 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOwVG-0005HM-IF for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:57:30 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] linux-user: identify running binary in /proc/self/exe Date: Mon, 19 Jan 2009 15:57:26 +0000 References: <20090119153008.GA20882@kos.to> In-Reply-To: <20090119153008.GA20882@kos.to> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200901191557.27453.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio On Monday 19 January 2009, Riku Voipio wrote: > Some applications like to test /proc/self/exe to find > out who they are. Fake the result of readlink() for > them. > + =A0 =A0exec_path =3D argv[optind]; Won't this give the wrong answer when the binary is invoked using a relativ= e=20 path or a symlink? On my system /proc/self/exe is always an absolute path t= o=20 an actual file. Paul