nameserv: set CLOEXEC flag on pipe file descriptors

This commit is contained in:
Miroslav Lichvar 2016-12-12 10:29:26 +01:00
parent 0c9a19ded5
commit 1b1384ccaa

View file

@ -113,6 +113,9 @@ DNS_Name2IPAddressAsync(const char *name, DNS_NameResolveHandler handler, void *
LOG_FATAL(LOGF_Nameserv, "pipe() failed");
}
UTI_FdSetCloexec(inst->pipe[0]);
UTI_FdSetCloexec(inst->pipe[1]);
resolving_threads++;
assert(resolving_threads <= 1);