diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c index ab491fbfe52b..9bc28ec8ac45 100644 --- a/src/util.c +++ b/src/util.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: util.c,v 8.416 2009/12/18 17:05:26 ca Exp $") +SM_RCSID("@(#)$Id: util.c,v 8.425 2012/03/03 00:10:43 ca Exp $") #include <sm/sendmail.h> #include <sysexits.h> @@ -2638,7 +2638,13 @@ proc_list_drop(pid, st, other) mark_work_group_restart(ProcListVec[i].proc_other, st); } else if (type == PROC_QUEUE) + { CurRunners -= ProcListVec[i].proc_count; + + /* CHK_CUR_RUNNERS() can't be used here: uses syslog() */ + if (CurRunners < 0) + CurRunners = 0; + } } /* @@ -2702,6 +2708,14 @@ proc_list_probe() (int) ProcListVec[i].proc_pid); ProcListVec[i].proc_pid = NO_PID; SM_FREE_CLR(ProcListVec[i].proc_task); + + if (ProcListVec[i].proc_type == PROC_QUEUE) + { + CurRunners -= ProcListVec[i].proc_count; + CHK_CUR_RUNNERS("proc_list_probe", i, + ProcListVec[i].proc_count); + } + CurChildren--; } else @@ -2852,3 +2866,4 @@ count_open_connections(hostaddr) } return n; } + |