Article View: comp.sys.amiga.tech
Article #1413Re: File name of current task
From: Chuck McManis
Date: Mon, 25 Sep 1989 18:33
Date: Mon, 25 Sep 1989 18:33
19 lines
1611 bytes
1611 bytes
In article <623@tardis.Tymnet.COM> jms@tardis.Tymnet.COM (Joe Smith) writes:
>AmigaDOS needs this, for the same reasons. Not as a kludge by mangling
>argv[0], but as a fully supported and official way. An example function
>name would be GetTaskFileName(). Of course, it should return NULL if the
>task was created on the fly and not loaded straight from disk.
Suggested Implementation :
Have LoadSeg() store a lock in the process structure for the
executable it has loaded (this will also help later if you ever want
to be able to page out of the executable) and provide a routine
GetProcessFileLock(Proc) or some such name that would return you this
lock. The user code would have to do an Examine(lock) to find the name
of the file, or it could just do a DupLock(lock);Parent(lock) to find a
lock on the directory where the original executable resides.
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
"If I were driving a Macintosh, I'd have to stop before I could turn the wheel."
Technical Details
Message-ID:
<125228@sun.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!newstop!sun!pepper!cmcmanisReferences:
<2045@leah.Albany.Edu> <623@tardis.Tymnet.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!newstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: File name of current task Message-ID: <125228@sun.Eng.Sun.COM> Date: 25 Sep 89 18:33:24 GMT References: <2045@leah.Albany.Edu> <623@tardis.Tymnet.COM> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 19