wahern / dns

dns.c: Single file non-blocking DNS C library without callbacks or external dependencies.
http://25thandclement.com/~william/projects/dns.c.html
MIT License
256 stars 64 forks source link

Use "e" (O_CLOEXEC) fopen mode flag #8

Closed wahern closed 8 years ago

wahern commented 8 years ago

Currently dns_hosts_loadpath, dns_resconf_loadpath, and dns_nssconf_loadpath are not thread-safe. The "e" mode flag to fopen is now widely supported and scheduled for inclusion in the next POSIX standard. Add support conditioned on a compile-time feature macro.