MCPcopy Index your code
hub / github.com/git/git / kill_some_child

Function kill_some_child

daemon.c:846–858  ·  view source on GitHub ↗

* This gets called if the number of connections grows * past "max_connections". * * We kill the newest connection from a duplicate IP. */

Source from the content-addressed store, hash-verified

844 * We kill the newest connection from a duplicate IP.
845 */
846static void kill_some_child(void)
847{
848 const struct child *blanket, *next;
849
850 if (!(blanket = firstborn))
851 return;
852
853 for (; (next = blanket->next); blanket = next)
854 if (!addrcmp(&blanket->address, &next->address)) {
855 kill(blanket->cld.pid, SIGTERM);
856 break;
857 }
858}
859
860static void check_dead_children(void)
861{

Callers 1

handleFunction · 0.85

Calls 1

addrcmpFunction · 0.85

Tested by

no test coverage detected