Dolda2000 GitWeb
/
icmp-dn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Should have thought of this...
[icmp-dn.git]
/
nss-icmp.c
diff --git
a/nss-icmp.c
b/nss-icmp.c
index
9c32c1c
..
5bc5ec7
100644
(file)
--- a/
nss-icmp.c
+++ b/
nss-icmp.c
@@
-32,6
+32,7
@@
#include <nss.h>
#include <sys/types.h>
#include <fcntl.h>
#include <nss.h>
#include <sys/types.h>
#include <fcntl.h>
+#include <sys/wait.h>
#define CONFIGFILE "/etc/nss-icmp.conf"
#if 0
#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;
pid_t child;
int pfd[2];
int rl;
+ int status;
struct cache *cc;
if(!inited) {
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]);
addrbuf[rl] = 0;
close(pfd[0]);
+ waitpid(child, &status, 0);
+
if((p = strchr(addrbuf, '\n')) == NULL) {
if(usecache)
cachenotfound(addr, len, af, nfttl);
if((p = strchr(addrbuf, '\n')) == NULL) {
if(usecache)
cachenotfound(addr, len, af, nfttl);