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

Function dynamic_process_final_exit

pt.c:462–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460
461
462void dynamic_process_final_exit(void)
463{
464 /* prevent any more IPC */
465 pt[process_no].ipc_pipe[0] = -1;
466 pt[process_no].ipc_pipe[1] = -1;
467 pt[process_no].ipc_sync_pipe[0] = -1;
468 pt[process_no].ipc_sync_pipe[1] = -1;
469
470 /* clear the per-process connection from the DB queues */
471 ql_force_process_disconnect(process_no);
472
473 /* if a TCP proc by chance, reset the tcp-related data */
474 tcp_reset_worker_slot();
475
476 pt_become_idle();
477
478 /* mark myself as DYNAMIC (just in case) to have an err-less termination */
479 pt[process_no].flags |= OSS_PROC_SELFEXIT;
480 LM_INFO("doing self termination\n");
481
482 /* the process slot in the proc table will be purge on SIGCHLD by main */
483 exit(0);
484}
485
486int run_post_fork_handlers(void)
487{

Callers 7

handle_ioFunction · 0.85
handle_ioFunction · 0.85
handle_ioFunction · 0.85
handle_ioFunction · 0.85
tcp_terminate_workerFunction · 0.85

Calls 2

tcp_reset_worker_slotFunction · 0.85

Tested by

no test coverage detected