From owner-freebsd-questions  Tue Sep 21 12:40:53 1999
Delivered-To: freebsd-questions@freebsd.org
Received: from donhm.calcasieu.com (tcnet19-009.austin.texas.net [209.99.96.72])
	by hub.freebsd.org (Postfix) with ESMTP id 6D68B14F81
	for <freebsd-questions@FreeBSD.ORG>; Tue, 21 Sep 1999 12:40:46 -0700 (PDT)
	(envelope-from dread@texas.net)
Received: from donhm.calcasieu.com (localhost.calcasieu.com [127.0.0.1])
	by donhm.calcasieu.com (8.8.8/8.8.8) with ESMTP id OAA03084;
	Tue, 21 Sep 1999 14:40:22 -0500 (CDT)
	(envelope-from dread@texas.net)
Message-ID: <XFMail.990921144020.dread@texas.net>
X-Mailer: XFMail 1.3 [p0] on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <19990921020955.C16138@fly.lglobus.ru>
Date: Tue, 21 Sep 1999 14:40:20 -0500 (CDT)
From: Don Read <dread@texas.net>
To: "Oleg V. Volkov" <rover@lglobus.ru>
Subject: RE: How to find absolute name of running binary?
Cc: freebsd-questions@FreeBSD.ORG
Sender: owner-freebsd-questions@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG


On 20-Sep-99 Oleg V. Volkov wrote:
> Hi!
> 
> Well subject says it all. How could i find absolute name of my running
> binary from inside it? References to man or C examples welcome.
> 
> Please CC: replys to me - i'm not on list.
> 

You can't.
The best you can hope for is to look at args[0]; and hope the calling
process set it correctly.

Regards,
---
Don Read                                 dread@calcasieu.com
EDP Manager                                  dread@texas.net
Calcasieu Lumber Co.                               Austin TX
-- the Y2K bug is not a problem. W2K however ...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message