🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #1032

Re: How do I get the program name (argv[0])?

#1032
From: Landon Dyer
Date: Wed, 28 May 1986 18:38
20 lines
1445 bytes
> Does anyone know any way to read the name of an application or accessory
> once it has been started (argv[0] to traditional `C' programmers).

No.  Not possible unless you have cooperation from the process that
Pexec()'d your application.  GEMDOS does not pass or preserve the name
of the program that was loaded.  The desktop does not cooperate.

This misfeature is a result of the way commandline arguments are
passed to an application.  It's been a problem --- in the CP/M and
MSDOS model operating systems --- since the first CP/M-80 C compilers
came out....

-- 

-Landon Dyer, Atari Corp.		{lll-lcc,lll-crg!vecpyr}!atari!dyer

/-----------------------------------------------\
| The views represented here do not necessarily | "If Business is War, then
| reflect those of Atari Corp., or even my own. |  I'm a Prisoner of Business!"
\-----------------------------------------------/
Technical Details
Message-ID: <305@atari.UUcp>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!lll-crg!lll-lcc!vecpyr!atari!dyer
References: <520@snow.warwick.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!lll-crg!lll-lcc!vecpyr!atari!dyer
From: dyer@atari.UUcp (Landon Dyer)
Newsgroups: net.micro.atari16
Subject: Re: How do I get the program name (argv[0])?
Message-ID: <305@atari.UUcp>
Date: Wed, 28-May-86 14:38:22 EDT
Article-I.D.: atari.305
Posted: Wed May 28 14:38:22 1986
Date-Received: Sat, 31-May-86 05:33:04 EDT
References: <520@snow.warwick.UUCP>
Organization: Atari Corp., Sunnyvale CA
Lines: 20