Skip site navigation (1) Skip section navigation (2)

Re: setproctitle()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: setproctitle()
Date: 2000-05-23 23:28:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > Comments?
> I would like to see it, but not for v7.0.1 ... unless you can figure out a
> cleaner way of doing it, the coding changes would be extensive ...
> I looked at it, and unless we go with global variables *yeech*, you would
> have to pass down the "fixed" part of the setproctitle to sub-functions
> (ie. argv[0-4](?)) ... I asked on one of the freebsd lists if anyone could
> suggest a way of getting 'argv[0]', but never did hear anything back ...
> If you want, you could just added, for v7.0.1, a simple addition of 'if
> __FreeBSD__' to the code, so that setproctitle is only used under FreeBSD
> ...

No, it is pretty easy to do it in pg_status.h alone.  The trick is to
do sprintf(ps_status_buffer, "val val %s"), then use that in
setproctitle for every command.

I will code it up if no one objects.

  Bruce Momjian                        |
  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

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-05-23 23:28:50
Subject: Re: setproctitle()
Previous:From: The Hermit HackerDate: 2000-05-23 23:07:00
Subject: Re: setproctitle()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group