This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "sfcb - Small Footprint CIM Broker".
The branch, master has been updated
via 81089c56ed95a93819baa6e97c38f5fc45a02442 (commit)
from 8f807ce9ea1bc25d47c9490292f612d3824a8f4a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 81089c56ed95a93819baa6e97c38f5fc45a02442
Author: Dave Heller <hel...@us...>
Date: Sat Jan 11 20:12:00 2014 -0500
[sfcb-tix:#96] Provider should close req handler on shutdown
-----------------------------------------------------------------------
Summary of changes:
providerDrv.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/providerDrv.c b/providerDrv.c
index 6526925..75c5ebd 100644
--- a/providerDrv.c
+++ b/providerDrv.c
@@ -522,10 +522,27 @@ handleSigError(int sig)
static void
handleSigUsr1(int __attribute__ ((unused)) sig)
{
+ Parms *threads = activeThreadsFirst;
+ int dmy = -1;
+ stopping = 1;
+
+ if (threads) {
+ char msg[1024];
+ snprintf(msg, 1023, "*** Provider %s(%d) exiting due to a shutdown request",
+ processName, currentProc);
+ BinResponseHdr *buf = errorCharsResp(CMPI_RC_ERR_FAILED, msg);
+ BinResponseHdr *resp;
+ long rlen = makeSafeResponse(buf, &resp);
+
+ while (threads) {
+ spSendResult(&threads->requestor, &dmy, resp, rlen);
+ threads = threads->next;
+ }
+ }
+
pthread_t t;
pthread_attr_t tattr;
- stopping = 1;
pthread_attr_init(&tattr);
pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
pthread_create(&t, &tattr, (void *(*)(void *)) stopProc, NULL);
hooks/post-receive
--
sfcb - Small Footprint CIM Broker
|