<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Nicolas,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">you are right, there is no special function for children destroy. Most modules do not need it, as the data is in shared memory, processes are started over standard kamailio APIs which will be stopped from the core automatically,
 to give some background.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Some modules do it by just iterating over an internal list of their children and then do the cleanup task. You can find an example in cdp module (destroy, diameter_peer_destroy).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">-- <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt – </span><a href="https://skalatan.de/blog/"><span lang="EN-GB">https://skalatan.de/blog/</span></a><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services – </span><a href="https://gilawa.com/"><span lang="EN-GB">https://gilawa.com</span></a><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b><span style="mso-fareast-language:DE">From:</span></b><span style="mso-fareast-language:DE"> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Chaigneau, Nicolas<br>
<b>Sent:</b> Tuesday, October 26, 2021 7:14 PM<br>
<b>To:</b> sr-users@lists.kamailio.org<br>
<b>Subject:</b> [SR-Users] No "child_destroy" export ?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">Hello,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">I have a module, for which I need to perform some processing in the children processes when Kamailio is being stopped.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">I’ve looked at the "struct module_export", in which I see "mod_init", "child_init", "mod_destroy"… but no "child_destroy". :/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">Is there a way to achieve this ?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">Thanks for your help.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">Regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR">Nicolas.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="FR" style="font-size:7.0pt;mso-fareast-language:DE">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the
 person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately
 and delete all copies of this message.</span><span lang="FR" style="mso-fareast-language:DE"><o:p></o:p></span></p>
</div>
</body>
</html>