🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #523

Re: What is my name?

#523
From: Rob Peck
Date: Tue, 18 Jul 1989 16:53
19 lines
1573 bytes
In article <26406@agate.BERKELEY.EDU> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
><In article <26385@agate.BERKELEY.EDU> mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
><>Before I sit down & write it myself, does anyone have a piece of code
><>that will give me a full name for the binary it's running in? Not just
><>argv[0], but the name path & file name (not file, but c:file, or
><>sys:system/file, or whatever).

[examples deleted]

I now understand your question exactly and I agree that the current
directory path name listing is inadequate.  Looks like you have some
work on your hands.  To know exactly where-from the binary that is
running was drawn, you need to know both the PATH and the command
that was issued, so you'd have to get to the command history of
the originating CLI (if there was one).  Frankly, without doing
both of these, I cannot see how a binary can identify the directory
in which it resides and from which it was called.     AAARRRGGGHHH!

Rob Peck
Technical Details
Message-ID: <7374@ardent.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!sun-barr!apple!vsi1!ubvax!ardent!peck!rap
References: <26385@agate.BERKELEY.EDU> <7330@ardent.UUCP> <26406@agate.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!sun-barr!apple!vsi1!ubvax!ardent!peck!rap
From: rap@peck.ardent.com (Rob Peck)
Newsgroups: comp.sys.amiga.tech
Subject: Re: What is my name?
Message-ID: <7374@ardent.UUCP>
Date: 18 Jul 89 16:53:42 GMT
References: <26385@agate.BERKELEY.EDU> <7330@ardent.UUCP> <26406@agate.BERKELEY.EDU>
Sender: news@ardent.UUCP
Reply-To: rap@peck.ardent.com (Rob Peck)
Organization: Ardent Computer Corp., Sunnyvale, CA
Lines: 19