cgi: call init_destroy even though not on available roles list
cgi is a role, but it's not an externally-selectable role... it's only
used when the mount indicates it should be.
That means it's not in the list of EVERY_AVAILABLE_ROLE... make sure
its zombie child reaping timer is started at context creation and
stopped at destruction.
diff --git a/lib/core/context.c b/lib/core/context.c
index c712263..cec3de3 100644
--- a/lib/core/context.c
+++ b/lib/core/context.c
@@ -509,6 +509,10 @@
ar->pt_init_destroy(context, info,
&context->pt[n], 0);
} LWS_FOR_EVERY_AVAILABLE_ROLE_END;
+
+#if defined(LWS_WITH_CGI)
+ role_ops_cgi.pt_init_destroy(context, info, &context->pt[n], 0);
+#endif
}
lwsl_info(" Threads: %d each %d fds\n", context->count_threads,
@@ -837,6 +841,10 @@
ar->pt_init_destroy(context, NULL, pt, 1);
} LWS_FOR_EVERY_AVAILABLE_ROLE_END;
+#if defined(LWS_WITH_CGI)
+ role_ops_cgi.pt_init_destroy(context, NULL, pt, 1);
+#endif
+
if (context->event_loop_ops->destroy_pt)
context->event_loop_ops->destroy_pt(context, n);