<p></p>
<p>I asked in the dev email list without a response.<br>
So will also here.</p>
<p>I have observed a case when Kamaili debug module try to grab the lock on shutdown and not able to do it.<br>
As a result, the Kamailio process is stuck and not able to restart (dead lock).</p>
<p>To resolve such a case I want to utilize systemd watchdog <a href="https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html" rel="nofollow">feature</a></p>
<p>To use this feature I need to send sd_notify(3) with a message string of "WATCHDOG=1" from the main process.<br>
<a href="https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html" rel="nofollow">Link</a></p>
<p>According to systemd doc watchdog can be applied only to one process. <a href="https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html" rel="nofollow">Link</a></p>
<blockquote>
<p>If the $WATCHDOG_USEC environment variable is set, and the $WATCHDOG_PID variable is unset or set to the PID of the current process, the service manager expects notifications from this process.</p>
</blockquote>
<p><a href="https://lists.freedesktop.org/archives/systemd-devel/2018-January/040185.html" rel="nofollow">Additional info</a></p>
<p>Could you suggest how to embed this systemd call to the main process? This will allow use <code>systemsd watchdog</code> feature.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2795#issuecomment-874464216">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIFGC7LUHAECHEJ43LTWKFZNANCNFSM47WKSJCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZI7FZLBBAWD6XMCKITTWKFZNA5CNFSM47WKSJCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGQPUHWA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2795#issuecomment-874464216",
"url": "https://github.com/kamailio/kamailio/issues/2795#issuecomment-874464216",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>