mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 22:10:12 -04:00
Set close-on-exec bit for filedescriptors created by dns subsystem.
Based on patch for 1.4 by Ralf Schmitt.
This commit is contained in:
parent
da6e7cd495
commit
d0b884338f
1
evdns.c
1
evdns.c
@ -2372,6 +2372,7 @@ _evdns_nameserver_add_impl(struct evdns_base *base, const struct sockaddr *addre
|
||||
|
||||
ns->socket = socket(PF_INET, SOCK_DGRAM, 0);
|
||||
if (ns->socket < 0) { err = 1; goto out1; }
|
||||
evutil_make_socket_closeonexec(ns->socket);
|
||||
evutil_make_socket_nonblocking(ns->socket);
|
||||
|
||||
if (base->global_outgoing_addrlen &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user