MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / count_init_child_processes

Function count_init_child_processes

pt.c:407–424  ·  view source on GitHub ↗

counts the number of processes created by OpenSIPS at startup. processes * that also do child_init() (the per-process module init) * * used for proper status return code */

Source from the content-addressed store, hash-verified

405 * used for proper status return code
406 */
407int count_init_child_processes(void)
408{
409 int ret=0;
410
411 /* listening children to be create at startup */
412 ret += udp_count_processes(NULL);
413 ret += tcp_count_processes(NULL);
414 ret += timer_count_processes(NULL) - 2/*for keeper & trigger*/;
415
416 /* attendent */
417 ret++;
418
419 /* count number of module procs going to be initialised */
420 ret += count_module_procs(PROC_FLAG_INITCHILD);
421
422 LM_DBG("%d children are going to be inited\n",ret);
423 return ret;
424}
425
426/* counts the number of processes known by OpenSIPS at startup.
427 * Note that the number of processes might change during init, if one of the

Callers 1

wait_for_all_childrenFunction · 0.85

Calls 4

udp_count_processesFunction · 0.85
tcp_count_processesFunction · 0.85
timer_count_processesFunction · 0.85
count_module_procsFunction · 0.85

Tested by

no test coverage detected