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:
parent
de08cd99b2
commit
3339c9b9b4
@ -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;
|
||||
|
@ -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 ==== */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user