src/server/daemon/event.c

changeset 556
b036ccad4b49
parent 555
66b0accda0a8
equal deleted inserted replaced
555:66b0accda0a8 556:b036ccad4b49
77 77
78 return ret; 78 return ret;
79 } 79 }
80 80
81 void shutdown_eventhandlers_wait(void) { 81 void shutdown_eventhandlers_wait(void) {
82 log_ereport(LOG_INFORM, "shutdown eventhandlers");
83
82 CxIterator i = cxMapIteratorValues(event_handler_map); 84 CxIterator i = cxMapIteratorValues(event_handler_map);
83 cx_foreach(EVHandler *, e, i) { 85 cx_foreach(EVHandler *, e, i) {
84 evhandler_shutdown(e); 86 evhandler_shutdown(e);
85 } 87 }
86 88
88 cx_foreach(EVHandler *, e, i) { 90 cx_foreach(EVHandler *, e, i) {
89 evhandler_wait_and_destroy(e); 91 evhandler_wait_and_destroy(e);
90 } 92 }
91 93
92 cxMapDestroy(event_handler_map); 94 cxMapDestroy(event_handler_map);
95
96 log_ereport(LOG_INFORM, "all eventhandlers closed");
93 } 97 }
94 98
95 void evhandler_shutdown(EVHandler *h) { 99 void evhandler_shutdown(EVHandler *h) {
96 for(int i=0;i<h->numins;i++) { 100 for(int i=0;i<h->numins;i++) {
97 ev_instance_shutdown(h->instances[i]); 101 ev_instance_shutdown(h->instances[i]);

mercurial