Document sufficiently complex, yet deceptively simple, function

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-01-23 00:44:40 +01:00
1 parent c64a71ff30
commit 1df6a91a94
1 file changed
+11
+11
View File
@@ -847,6 +847,17 @@ recreate:
return 0;
}
/*
* This function is called when cleaning up lingering (stopped) services
* after a .conf reload, as well as when an inetd connection terminates.
*
* We need to ensure we properly stop the service before removing it,
* including stopping any pending restart or SIGKILL timers before we
* proceed to free() the svc itself.
*
* Remember to not try to stop inetd connections, they only get here
* when already stopped, if we do we end up in a recursive loop.
*/
void service_unregister(svc_t *svc)
{
if (!svc)