summaryrefslogtreecommitdiff
path: root/source3/lib/server_prefork.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-05-09 08:49:50 -0400
committerAndreas Schneider <asn@samba.org>2011-08-10 18:14:04 +0200
commit3339c9b9b43f4ee1b7f8fb61b3701364b8c81e03 (patch)
treee343e43af74161fdb712c9981ae6a091dfd2f577 /source3/lib/server_prefork.c
parentde08cd99b2832aca319d81cd27c0c71838567f8d (diff)
downloadsamba-3339c9b9b43f4ee1b7f8fb61b3701364b8c81e03.tar.gz
samba-3339c9b9b43f4ee1b7f8fb61b3701364b8c81e03.tar.bz2
samba-3339c9b9b43f4ee1b7f8fb61b3701364b8c81e03.zip
s3-prefork: provide way to send a signal to all children
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/lib/server_prefork.c')
-rw-r--r--source3/lib/server_prefork.c14
1 files changed, 14 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;