summaryrefslogtreecommitdiff
path: root/source3/web/statuspage.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/web/statuspage.c')
-rw-r--r--source3/web/statuspage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index 5c800797c0..27a40d1695 100644
--- a/source3/web/statuspage.c
+++ b/source3/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();