diff options
author | Simo Sorce <idra@samba.org> | 2011-08-17 15:21:12 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:05:06 -0400 |
commit | 91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc (patch) | |
tree | bda18b735ad2ee2fcbdf0592096084d45e38db8c /source3/lib/server_prefork.c | |
parent | 98d2bf052e214580a3ca3146b10688c9e1c7bc78 (diff) | |
download | samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.tar.gz samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.tar.bz2 samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.zip |
s3-prefork: Add parent->client messaging
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/lib/server_prefork.c')
-rw-r--r-- | source3/lib/server_prefork.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/lib/server_prefork.c b/source3/lib/server_prefork.c index 82645504f8..bcb5e0f19e 100644 --- a/source3/lib/server_prefork.c +++ b/source3/lib/server_prefork.c @@ -19,6 +19,8 @@ */ #include "includes.h" +#include "serverid.h" +#include "messages.h" #include "system/time.h" #include "system/shmem.h" #include "system/filesys.h" @@ -423,6 +425,23 @@ void prefork_send_signal_to_all(struct prefork_pool *pfp, int signal_num) } } +void prefork_warn_active_children(struct messaging_context *msg_ctx, + struct prefork_pool *pfp) +{ + const DATA_BLOB ping = data_blob_null; + int i; + + for (i = 0; i < pfp->pool_size; i++) { + if (pfp->pool[i].status == PF_WORKER_NONE) { + continue; + } + + messaging_send(msg_ctx, + pid_to_procid(pfp->pool[i].pid), + MSG_PREFORK_PARENT_EVENT, &ping); + } +} + static void prefork_sigchld_handler(struct tevent_context *ev_ctx, struct tevent_signal *se, int signum, int count, |