Gentoo Archives: gentoo-user

From: Iain Buchanan <iaindb@××××××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: get process name in c++
Date: Fri, 07 Jul 2006 05:12:50
Message-Id: 1152248749.31828.7.camel@orpheus
In Reply to: Re: [gentoo-user] OT: get process name in c++ by Richard Fish
1 On Thu, 2006-07-06 at 21:48 -0700, Richard Fish wrote:
2 > On 7/6/06, Iain Buchanan <iaindb@××××××××××××.au> wrote:
3 > > yes I would, except that I'm editing a class which is inherited by a
4 > > multitude of programs, so the /proc way I only have to change one file,
5 > > whereas the argv[0] way I have to change every source file...
6 >
7 > No, that's the point of a global. Inheritance and all doesn't matter.
8 >
9 > You change main.c (2 lines):
10 > char* progname = 0;
11
12 but I don't have just one main.c, I have 20+ different apps, each with
13 their own main.c, which I don't maintain, for which I'd have to issue
14 updates. Not to mention educate the other programmers on including this
15 ditty in each new app.
16
17 the /proc way I can just update the class in the background, which is in
18 cvs, and no one even knows the difference...
19
20 but please keep responding with ideas :)
21 --
22 Iain Buchanan <iaindb at netspace dot net dot au>
23
24 When you go out to buy, don't show your silver.
25
26 --
27 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] OT: get process name in c++ Richard Fish <bigfish@××××××××××.org>