summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-10-04 21:43:06 +0000
committerpjd <pjd@FreeBSD.org>2010-10-04 21:43:06 +0000
commitb85b0868d9fd8bf233b83cdd9f1b43cb430a0d31 (patch)
tree29dc0a0c2303c317e05211120eb51803bc935c21 /sbin/hastd
parent0651a7ac68496a46c14397f853730a149dd8809c (diff)
downloadFreeBSD-src-b85b0868d9fd8bf233b83cdd9f1b43cb430a0d31.zip
FreeBSD-src-b85b0868d9fd8bf233b83cdd9f1b43cb430a0d31.tar.gz
hook_check() is now only used to report about long-running hooks, so the
argument is redundant, remove it. MFC after: 3 days
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/hastd.c2
-rw-r--r--sbin/hastd/hooks.c12
-rw-r--r--sbin/hastd/hooks.h2
3 files changed, 3 insertions, 13 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index 8b59c14..10e5131 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -659,7 +659,7 @@ main_loop(void)
assert(maxfd + 1 <= (int)FD_SETSIZE);
ret = select(maxfd + 1, &rfds, NULL, NULL, &seltimeout);
if (ret == 0)
- hook_check(false);
+ hook_check();
else if (ret == -1) {
if (errno == EINTR)
continue;
diff --git a/sbin/hastd/hooks.c b/sbin/hastd/hooks.c
index 35c3255..9e12300 100644
--- a/sbin/hastd/hooks.c
+++ b/sbin/hastd/hooks.c
@@ -293,24 +293,14 @@ hook_check_one(pid_t pid, int status)
}
void
-hook_check(bool sigchld)
+hook_check(void)
{
struct hookproc *hp, *hp2;
- int status;
time_t now;
- pid_t pid;
assert(hooks_initialized);
/*
- * If SIGCHLD was received, garbage collect finished processes.
- */
- if (sigchld) {
- while ((pid = wait3(&status, WNOHANG, NULL)) > 0)
- hook_check_one(pid, status);
- }
-
- /*
* Report about processes that are running for a long time.
*/
now = time(NULL);
diff --git a/sbin/hastd/hooks.h b/sbin/hastd/hooks.h
index 5cc57df..4ce435e 100644
--- a/sbin/hastd/hooks.h
+++ b/sbin/hastd/hooks.h
@@ -41,7 +41,7 @@
void hook_init(void);
void hook_fini(void);
void hook_check_one(pid_t pid, int status);
-void hook_check(bool sigchld);
+void hook_check(void);
void hook_exec(const char *path, ...);
void hook_execv(const char *path, va_list ap);
OpenPOWER on IntegriCloud