hook_check() is now only used to report about long-running hooks, so the

argument is redundant, remove it.

MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2010-10-04 21:43:06 +00:00
parent 41013c0b21
commit 5f24b330df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213429
3 changed files with 3 additions and 13 deletions

View File

@ -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;

View File

@ -293,23 +293,13 @@ 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.
*/

View File

@ -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);