X-Git-Url: http://dolda2000.com/gitweb/?p=icmp-dn.git;a=blobdiff_plain;f=nss-icmp.c;h=5bc5ec7db9cbfe7dbf529da8200a04651b9a3289;hp=9c32c1c8d2bedf0bb706da481e9dc42dac08f3bf;hb=46c363805b847cb55d9e4ebff5d9e9d085896740;hpb=732b835938a7a80fe3c5ef71b84fa2ce0090bd01 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);