setproctitle() - Mailing list pgsql-hackers

From Bruce Momjian
Subject setproctitle()
Date
Msg-id 200005240013.UAA04963@candle.pha.pa.us
Whole thread Raw
Responses Re: setproctitle()
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Re: SQL3 UNDER
Next
From: Bruce Momjian
Date:
Subject: Re: MySQL now supports transactions ...