From: Miroslav Lichvar Date: Mon, 12 Dec 2016 09:29:26 +0000 (+0100) Subject: nameserv: set CLOEXEC flag on pipe file descriptors X-Git-Tag: 3.0-pre2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b1384ccaabc6fa61a236d7fbba866f7af4e317d;p=thirdparty%2Fchrony.git nameserv: set CLOEXEC flag on pipe file descriptors --- diff --git a/nameserv_async.c b/nameserv_async.c index e9932353..3e29674b 100644 --- a/nameserv_async.c +++ b/nameserv_async.c @@ -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);