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

Поиск
Список
Период
Сортировка
От Oleg Broytmann
Тема Re: [HACKERS] backend now show status in 'ps'
Дата
Msg-id Pine.LNX.3.96.SK.980608193415.8666A-100000@torus.comus.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] backend now show status in 'ps'  (Massimo Dal Zotto <dz@cs.unitn.it>)
Список 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@earthling.net
           Programmers don't die, they just GOSUB without RETURN.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Need some help on code
Следующее
От: Ewan Mellor
Дата:
Сообщение: bool exported to user namespace