From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Vince Vielhaber <vev(at)michvhf(dot)com> |
Cc: | The Hermit Hacker <scrappy(at)hub(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: setproctitle() no longer used? |
Date: | 2000-05-10 23:07:46 |
Message-ID: | 200005102307.TAA13693@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > So if you use -lutil, the argv[0] trick works, and if you don't, it
> > doesn't? If so, we can get that into the FreeBSD template.
>
> 'splain the "argv[0] trick" briefly.
It is a nifty BSD one. If you assign argv[0] in the program to a
string, it shows in ps.
argv[0] = "new ps string";
The Linux method is:
strcpy(argv[0], "new ps string");
In the second case, you are actually writing into the environment area
use to store args. Not real great, but it works on Linux.
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Vince Vielhaber | 2000-05-10 23:48:22 | Re: setproctitle() no longer used? |
Previous Message | Vince Vielhaber | 2000-05-10 23:06:21 | Re: setproctitle() no longer used? |