Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.questions Subject: Re: Get process name w/o using argv[0] in C function? Message-ID: <3128@skye.ed.ac.uk> Date: 6 Aug 90 13:04:54 GMT References: <9220003@hpldsla.sid.hp.com> <3802@auspex.auspex.com> <1990Aug2.143551.7104@specialix.co.uk> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 16 In article <1990Aug2.143551.7104@specialix.co.uk> jonb@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@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin