diff options
Diffstat (limited to 'libasyncns')
-rw-r--r-- | libasyncns/asyncns-test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libasyncns/asyncns-test.c b/libasyncns/asyncns-test.c index 57c987d..b8604e6 100644 --- a/libasyncns/asyncns-test.c +++ b/libasyncns/asyncns-test.c @@ -31,6 +31,8 @@ #include <arpa/nameser.h> #include <resolv.h> #include <assert.h> +#include <signal.h> +#include <errno.h> #include "asyncns.h" @@ -43,7 +45,9 @@ int main(int argc, char *argv[]) { char host[NI_MAXHOST] = "", serv[NI_MAXSERV] = ""; unsigned char *srv; - if (!(asyncns = asyncns_new(1))) { + signal(SIGCHLD, SIG_IGN); + + if (!(asyncns = asyncns_new(2))) { fprintf(stderr, "asyncns_new() failed\n"); goto fail; } |