From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | setproctitle() |
Date: | 2000-05-24 00:13:40 |
Message-ID: | 200005240013.UAA04963@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here is the new setproctitle() code, already committed for 7.0.1.
Works under BSDI, and I assume FreeBSD too.
---------------------------------------------------------------------------
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
do { \
sprintf(Ps_status_buffer, "%s %s %s %s", execname, hostname, username, dbname); \
} while (0)
#define PS_CLEAR_STATUS() \
do { setproctitle("%s", Ps_status_buffer); } while (0)
#define PS_SET_STATUS(status) \
do { setproctitle("%s %s", Ps_status_buffer, (status)); } while (0)
--
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 | Michael A. Olson | 2000-05-24 00:25:37 | Re: MySQL now supports transactions ... |
Previous Message | Ned Lilly | 2000-05-24 00:02:20 | Re: MySQL now supports transactions ... |