Mercurial > pidgin.yaz
changeset 15713:4530f15fe5af
Patch from Graham Booker which ensures that a process forked by dnsserv cleans up afterwards, calling waitpid() to make sure no zombies are left over.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sun, 25 Feb 2007 23:50:54 +0000 |
parents | 7ac07c5fb1c2 |
children | 557f37189a96 |
files | libpurple/dnssrv.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnssrv.c Sun Feb 25 23:02:25 2007 +0000 +++ b/libpurple/dnssrv.c Sun Feb 25 23:50:54 2007 +0000 @@ -67,6 +67,8 @@ char *query; char *error_message; GSList *results; +#else + pid_t pid; #endif }; @@ -188,6 +190,7 @@ GaimSrvResponse *tmp; int i; GaimSrvCallback cb = query_data->cb; + int status; read(source, &size, sizeof(int)); gaim_debug_info("dnssrv","found %d SRV entries\n", size); @@ -197,6 +200,7 @@ } cb(res, size, query_data->extradata); + waitpid(query_data->pid, &status, 0); gaim_srv_cancel(query_data); } @@ -344,6 +348,7 @@ query_data = g_new0(GaimSrvQueryData, 1); query_data->cb = cb; query_data->extradata = extradata; + query_data->pid = pid; query_data->handle = gaim_input_add(out[0], GAIM_INPUT_READ, resolved, query_data); g_free(query);