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

George Turczynski george at hls0.hls.oz
Wed Aug 8 10:06:12 AEST 1990


In article <13491 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> In article <1990Aug4.051827.16438 at nbc1.ge.com> scott at nbc1.GE.COM (Scott Barman) writes:
> >I cannot think of one rational or even irrational reason *not* to use
> >global variables.
> 
> Really?  I thought this was commonly taught in structured software development
> courses.

Yes, it is, as a principle, to discourage people from using
globals and no locals, as they might have gotten used to with
such things as BASIC.  It develops the ideas of information
hiding and so on.

The use of NO globals is however, only adopted by extremists.
As has been pointed out by someone already, the information
pertaining to the name of a process is GLOBAL BY DEFINITION,
and cannot be accessed except by direct or indirect use of
a global.  No way around it.

George P. J. Turczynski.          | ACSnet: george at highland.oz
                                  | Phone: 61 48 683490
Computer Systems Engineer.        | Fax:   61 48 683474
                                  |----------------------
Highland Logic Pty. Ltd.          | I can't speak for the
Suite 1, 348-354 Argyle Street    | company, I can barely
Moss Vale. NSW. 2577 Australia    | speak for myself...



More information about the Comp.unix.questions mailing list