1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

s3-prefork: provide way to send a signal to all children

Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Simo Sorce 2011-05-09 08:49:50 -04:00 committed by Andreas Schneider
parent de08cd99b2
commit 3339c9b9b4
2 changed files with 15 additions and 0 deletions

View File

@ -326,6 +326,20 @@ void prefork_reset_allowed_clients(struct prefork_pool *pfp)
}
}
void prefork_send_signal_to_all(struct prefork_pool *pfp, int signal_num)
{
int i;
for (i = 0; i < pfp->pool_size; i++) {
if (pfp->pool[i].status == PF_WORKER_NONE) {
continue;
}
kill(pfp->pool[i].pid, signal_num);
}
}
/* ==== Functions used by children ==== */
static SIG_ATOMIC_T pf_alarm;

View File

@ -72,6 +72,7 @@ int prefork_count_active_children(struct prefork_pool *pfp, int *total);
bool prefork_mark_pid_dead(struct prefork_pool *pfp, pid_t pid);
void prefork_increase_allowed_clients(struct prefork_pool *pfp, int max);
void prefork_reset_allowed_clients(struct prefork_pool *pfp);
void prefork_send_signal_to_all(struct prefork_pool *pfp, int signal_num);
/* ==== Functions used by children ==== */