Get process name w/o using argv[0] in C function?
Richard Tobin
richard at aiai.ed.ac.uk
Mon Aug 6 23:04:54 AEST 1990
In article <1990Aug2.143551.7104 at specialix.co.uk> jonb at specialix.co.uk (Jon Brawn) writes:
>>Also, I do not think I want to use a global and initialize it to
>>argv[0] in body of main(), because I do not use globals!
>Try this sort of thing:
>char *ProgName( pname )
Why is a global function preferable than a global variable?
-- Richard
--
Richard Tobin, JANET: R.Tobin at uk.ac.ed
AI Applications Institute, ARPA: R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
More information about the Comp.unix.questions
mailing list