diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-07-27 23:09:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-07-27 23:09:41 +0200 |
commit | 709981e01f7d3c1885f7cce08f60ebe016dd7098 (patch) | |
tree | a8c0c53e8115b0dc389ab101cb8db2be24857a35 /libasyncns/asyncns-test.c | |
parent | ad1bf0be2a367ace5ee3d7873f64a7eba13e6095 (diff) |
disable SIGCHLD in example
Diffstat (limited to 'libasyncns/asyncns-test.c')
-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; } |