# HG changeset patch # User Mark Doliner # Date 1313888063 0 # Node ID 9ed25c58e7ce180c7c9aaa9452857c0681b71611 # Parent a5c9f3c2352ecea1decb82418b44e76a028106a3 A while ago I noticed that we don't have enforce a max on the number of processes that we fork to do DNS SRV or TXT lookups. This is pretty minor and I don't care enough to fix it, but it seems like a good idea to mention it in the code. diff -r a5c9f3c2352e -r 9ed25c58e7ce libpurple/dnssrv.c --- a/libpurple/dnssrv.c Sun Aug 21 00:50:52 2011 +0000 +++ b/libpurple/dnssrv.c Sun Aug 21 00:54:23 2011 +0000 @@ -798,6 +798,12 @@ return NULL; } + /* + * TODO: We should put a cap on the number of forked processes that we + * allow at any given time. If we get too many requests they + * should be put into a queue and handled later. (This is what + * we do for A record lookups.) + */ pid = fork(); if (pid == -1) { purple_debug_error("dnssrv", "Could not create process!\n"); @@ -929,6 +935,12 @@ return NULL; } + /* + * TODO: We should put a cap on the number of forked processes that we + * allow at any given time. If we get too many requests they + * should be put into a queue and handled later. (This is what + * we do for A record lookups.) + */ pid = fork(); if (pid == -1) { purple_debug_error("dnssrv", "Could not create process!\n");