Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: get process name in c++
Date: Wed, 28 Jun 2006 16:13:07
Message-Id: 7573e9640606280855m56d47bd8ld50aeb91344ee455@mail.gmail.com
1 On 6/28/06, Iain Buchanan <iaindb@××××××××××××.au> wrote:
2 > I don't want to use argv[0], because the particular place is deep within
3 > classes, and there are too many (I'm doing some porting) to edit all of
4 > their constructors, for example, to pass argv[0].
5
6 The normal way of handling this is with a global variable. Just set
7 it in your main() function, and it can be accessed from any other code
8 in your program.
9
10 -Richard
11 --
12 gentoo-user@g.o mailing list