Re: [HACKERS] backend now show status in 'ps'

From: Oleg Broytmann <phd(at)comus(dot)ru>
To: Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>
Cc: PostgreSQL Hackers <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] backend now show status in 'ps'
Date: 1998-06-08 15:36:42
Message-ID: Pine.LNX.3.96.SK.980608193415.8666A-100000@torus.comus.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

On Mon, 8 Jun 1998, Massimo Dal Zotto wrote:
> > This worked under BSDI, because if you say argv[1] = "test", and argc is
> > at least 2, it shows "test" in ps. If argc is only one (they didn't use
> > any args), it will not show it, but I have added a nifty hack to the
> > postmaster to re-exec it so it is sure to have a least three args. I
> > strip them off before processing. You can see the patch in the patches
> > list.
>
> I believe, this won't work under Linux. I'm not 100% sure about it but from
> what I can remember Linux pass a copy of the original argv to the program
> and changing it doesn't change the argv strings shown by ps. You must zap
> the strings itself inside the page allocated for argv.
> I would suggest the following code which works fine also under linux, even
> with zero args.

AFAIK the only "portable" way is to steal copy from well-known sendmail
hacks...

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2(at)earthling(dot)net
Programmers don't die, they just GOSUB without RETURN.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ewan Mellor 1998-06-08 15:56:43 bool exported to user namespace
Previous Message Bruce Momjian 1998-06-08 15:29:12 Re: [HACKERS] v6.4 - What is planned...?