From: fredrik@DOLDA2000.COM Date: Fri, 13 May 2005 02:13:20 +0000 (+0000) Subject: Should have thought of this... X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=46c363805b847cb55d9e4ebff5d9e9d085896740;p=icmp-dn.git Should have thought of this... git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/icmp-dn@235 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/nss-icmp.c b/nss-icmp.c index 9c32c1c..5bc5ec7 100644 --- a/nss-icmp.c +++ b/nss-icmp.c @@ -32,6 +32,7 @@ #include #include #include +#include #define CONFIGFILE "/etc/nss-icmp.conf" #if 0 @@ -217,6 +218,7 @@ enum nss_status _nss_icmp_gethostbyaddr_r(const void *addr, socklen_t len, int a pid_t child; int pfd[2]; int rl; + int status; struct cache *cc; if(!inited) { @@ -310,6 +312,8 @@ enum nss_status _nss_icmp_gethostbyaddr_r(const void *addr, socklen_t len, int a addrbuf[rl] = 0; close(pfd[0]); + waitpid(child, &status, 0); + if((p = strchr(addrbuf, '\n')) == NULL) { if(usecache) cachenotfound(addr, len, af, nfttl);