9 /** This is a getaddrinfo() replacement that blocks SIGALRM,
10 * to avoid issues with non-reentrant getaddrinfo() implementations
11 * after SIGALRM timeouts, for instance on MacOS X or NetBSD. */
12 int fm_getaddrinfo(const char *node, const char *serv, const struct addrinfo *hints, struct addrinfo **res)
16 #ifndef GETADDRINFO_ASYNCSAFE
20 sigaddset(&ss, SIGALRM);
22 if (sigprocmask(SIG_BLOCK, &ss, &os))
23 report(stderr, GT_("Cannot modify signal mask: %s"), strerror(errno));
26 rc = getaddrinfo(node, serv, hints, res);
28 #ifndef GETADDRINFO_ASYNCSAFE
29 if (sigprocmask(SIG_SETMASK, &os, NULL))
30 report(stderr, GT_("Cannot modify signal mask: %s"), strerror(errno));
36 /** this is a debugging freeaddrinfo() wrapper. */
37 void fm_freeaddrinfo(struct addrinfo *ai)