Get process name w/o using argv[0] in C function?

David Collier-Brown davecb at yunexus.YorkU.CA
Sat Aug 4 12:03:45 AEST 1990


jonb at specialix.co.uk (Jon Brawn) writes:
>Try this sort of thing:
[function that saves argv[0] in a static]

   Er, that substitutes a globally callable function for a globally
referable variable.  Net gain? more code to do the same thing, value
is read-only.  
   Looks like a bad tradeoff unless you have an imposed religious
requirement to avoid global variables...

--dave
-- 
David Collier-Brown,  | davecb at Nexus.YorkU.CA, ...!yunexus!davecb or
72 Abitibi Ave.,      | {toronto area...}lethe!dave 
Willowdale, Ontario,  | "And the next 8 man-months came up like
CANADA. 416-223-8968  |   thunder across the bay" --david kipling



More information about the Comp.unix.questions mailing list