diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/server_prefork.c | 14 | ||||
-rw-r--r-- | source3/lib/server_prefork.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/server_prefork.c b/source3/lib/server_prefork.c index 000539da0f..958dc2655e 100644 --- a/source3/lib/server_prefork.c +++ b/source3/lib/server_prefork.c @@ -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; diff --git a/source3/lib/server_prefork.h b/source3/lib/server_prefork.h index 19ba32dff0..936ad8d5bd 100644 --- a/source3/lib/server_prefork.h +++ b/source3/lib/server_prefork.h @@ -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 ==== */ |