Thread: setproctitle()
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
Bruce Momjian writes: > Here is the new setproctitle() code, already committed for 7.0.1. Isn't that 7.1 material? Anyway, as I said before, I have this stuff all written up and it should even work on non-BSD and non-Linux systems. I'll get it tested and then we can put the issue to rest, I hope. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
[ Charset ISO-8859-1 unsupported, converting... ] > Bruce Momjian writes: > > > Here is the new setproctitle() code, already committed for 7.0.1. > > Isn't that 7.1 material? > > Anyway, as I said before, I have this stuff all written up and it should > even work on non-BSD and non-Linux systems. I'll get it tested and then we > can put the issue to rest, I hope. Well, the new setproctitle() code was getting used on my machine, and it didn't work. Seems it is disabled now, so it will wait for your 7.1 version. -- 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