svn commit: samba r15273 - in branches/SAMBA_4_0/source/smbd: .
metze at samba.org
metze at samba.org
Wed Apr 26 12:15:02 GMT 2006
Author: metze
Date: 2006-04-26 12:15:01 +0000 (Wed, 26 Apr 2006)
New Revision: 15273
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15273
Log:
fix setproctitle support
metze
Modified:
branches/SAMBA_4_0/source/smbd/process_standard.c
Changeset:
Modified: branches/SAMBA_4_0/source/smbd/process_standard.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/process_standard.c 2006-04-26 12:07:01 UTC (rev 15272)
+++ branches/SAMBA_4_0/source/smbd/process_standard.c 2006-04-26 12:15:01 UTC (rev 15273)
@@ -39,7 +39,11 @@
#include <setproctitle.h>
#endif
#else
-#define setproctitle(x)
+static int setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
+static int setproctitle(const char *fmt, ...)
+{
+ return 0;
+}
#endif
/*
@@ -120,8 +124,8 @@
c = socket_get_peer_addr(sock2, ev2);
s = socket_get_my_addr(sock2, ev2);
if (s && c) {
- setproctitle(("conn c[%s:%u] s[%s:%u] server_id[%d]",
- c->addr, c->port, s->addr, s->port, pid));
+ setproctitle("conn c[%s:%u] s[%s:%u] server_id[%d]",
+ c->addr, c->port, s->addr, s->port, pid);
}
talloc_free(c);
talloc_free(s);
@@ -177,7 +181,7 @@
/* Ensure that the forked children do not expose identical random streams */
set_need_random_reseed();
- setproctitle(("task server_id[%d]", pid));
+ setproctitle("task server_id[%d]", pid);
/* setup this new connection */
new_task(ev2, pid, private);
@@ -214,9 +218,9 @@
static void standard_set_title(struct event_context *ev, const char *title)
{
if (title) {
- setproctitle(("%s", title));
+ setproctitle("%s", title);
} else {
- setproctitle((NULL));
+ setproctitle(NULL);
}
}
More information about the samba-cvs
mailing list