Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe4ae8f

Browse files
committed
this fixes the bug where setting the entry in he process table no longer worksunder FreeBSD ... basically, if setproctitle() exists, use it ...the draw back right now is the PS_SET_STATUS stuff doesn't work, but am lookinginto that one right now ... at lesat now you can see who is connecting whereand from where ...
1 parent3383e8b commitbe4ae8f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

‎src/include/utils/ps_status.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,27 @@
1111
#ifndefPS_STATUS_H
1212
#definePS_STATUS_H
1313

14-
#ifdeflinux
14+
#ifdefHAVE_SETPROCTITLE
15+
16+
externcharPs_status_buffer[];
17+
18+
#undef PS_DEFINE_BUFFER
19+
20+
#definePS_INIT_STATUS(argc,argv,execname,username,hostname,dbname) \
21+
do { \
22+
Assert(argc >= 5); \
23+
setproctitle("%s %s %s %s %s", execname, hostname, username, dbname, Ps_status_buffer); \
24+
} while (0)
25+
26+
#definePS_CLEAR_STATUS() \
27+
do { Ps_status_buffer[0] = '\0'; } while (0)
28+
29+
#definePS_SET_STATUS(status) \
30+
do { strcpy(Ps_status_buffer, (status)); } while (0)
31+
32+
#definePS_STATUS (Ps_status_buffer)
33+
34+
#elif defined(linux)
1535

1636
#include<string.h>
1737

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp