summaryrefslogtreecommitdiffstats
path: root/source/web
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-07 03:55:54 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-07 03:55:54 +0000
commit7e57adf2a039cb5b6458496f9190c9c642645600 (patch)
tree4c7d072df6c135a3b9d3b8eb346d3063c3e486c8 /source/web
parenta69532ffde761453f3d9189be2fbf1036c2ed196 (diff)
downloadsamba-7e57adf2a039cb5b6458496f9190c9c642645600.tar.gz
samba-7e57adf2a039cb5b6458496f9190c9c642645600.tar.xz
samba-7e57adf2a039cb5b6458496f9190c9c642645600.zip
merge some fixes from 2.2
Diffstat (limited to 'source/web')
-rw-r--r--source/web/statuspage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/web/statuspage.c b/source/web/statuspage.c
index 5c800797c04..27a40d16958 100644
--- a/source/web/statuspage.c
+++ b/source/web/statuspage.c
@@ -21,6 +21,7 @@
#include "includes.h"
+static pid_t smbd_pid;
static char *tstring(time_t t)
{
@@ -93,7 +94,8 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st
struct connections_data crec;
memcpy(&crec, dbuf.dptr, sizeof(crec));
- if (crec.cnum != -1 || !process_exists(crec.pid)) return 0;
+ if (crec.cnum != -1 || !process_exists(crec.pid) ||
+ (crec.pid == smbd_pid)) return 0;
printf("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td>\n",
(int)crec.pid,
@@ -133,6 +135,8 @@ void status_page(void)
int refresh_interval=30;
TDB_CONTEXT *tdb;
+ smbd_pid = pidfile_pid("smbd");
+
if (cgi_variable("smbd_restart")) {
stop_smbd();
start_smbd();