mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 21:11:04 +01:00
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:
parent
41013c0b21
commit
5f24b330df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213429
@ -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;
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user