Re: Euphoria environment variables (was: quick cgi question)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Me wrote:

> Ed Davis wrote:

<snip>

>> But is this cross-platform?
>> 
>> Under DOS and Windows, C compilers use argv[0] to get the complete path
>> to the program.
>> 
>> However, argv[0] isn't populated the same way under Linux. argv[0]
>> appears to contain the command string that was typed to start the
>> executable.  This is on RedHat, SlackWare, and Knoppix.  I assume the
>> other distributions are the same?
>> 
>> I don't know about FreeBSD, but I assume this is a Unix thing.
>> 
>> So, how does a program find the complete path to itself on Linux?
> 
> I don't know how this would work with C, but fortunately the Euphoria
> interpreter front-end and translator are written in Euphoria now. smile
> 
> }}}
<eucode>

<snip>

What I forgot to mention:
As I understand the documentation of Eu's command_line() function, at least
for executable files the second element always contains its full path name.
Can you confirm that regarding some Linux distributions?

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu